![]() |
Control.Enabled always returns True in Execute Sub |
Post Reply ![]() |
Author | |
MikeArmstrong ![]() Newbie ![]() Joined: 10 October 2007 Status: Offline Points: 1 |
![]() ![]() ![]() ![]() ![]() Posted: 10 October 2007 at 6:20am |
Hi,
I have used KeyBindings to create keyboard shortcuts to my menu functions. However, when I use the keyboard shortcut, the 'Enabled' status of the control is ignored. I therefore put a check at the top of the CommandBars_Execute procedure to the effect of If Not Control.Enabled Then Exit Sub End If However, Control.Enabled always returns True, even when I can see the button on the CommandBar is NOT enabled. Control.ID does return the correct ID however the ToolTipText and Description properties are empty. The control does display a tooltip though. Something doesn't add up here... Any Ideas? Thanks Mike |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello,
its designed behavior. You create kebinding for Id - not for some button instance.
I recommend you enable/disable controls in update handlers or using Actions - this way keybinging will be also disabled.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |