Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Control.Enabled always returns True in Execute Sub
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Control.Enabled always returns True in Execute Sub

 Post Reply Post Reply
Author
Message
MikeArmstrong View Drop Down
Newbie
Newbie


Joined: 10 October 2007
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote MikeArmstrong Quote  Post ReplyReply Direct Link To This Post Topic: Control.Enabled always returns True in Execute Sub
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 October 2007 at 2:10pm
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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.