Multiple keybindings for one ID |
Post Reply |
Author | |
Spyder
Newbie Joined: 17 November 2004 Location: Australia Status: Offline Points: 29 |
Post Options
Thanks(0)
Posted: 12 December 2004 at 9:57pm |
I have two keybindings for my "find" button, Ctrl+F and F3. No matter which order I register them, F3 always comes up in the menu as the shortcut key - but I would prefer to show Ctrl+F.
Is there any way to force this to happen? |
|
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
|
Use the 'ShortcutText' property of the control. This will set the text that is displayed to indicate the shortcut that will fire the command. This technique can only be used if you don't allow customization of your commands by the end user. Otherwise, they may change the setting (and Codejock doesn't provide any interface to know which keybindings are mapped to which commands). |
|
Spyder
Newbie Joined: 17 November 2004 Location: Australia Status: Offline Points: 29 |
Post Options
Thanks(0)
|
I'll try that, but according to the docs:
"This property is obsolete and is not used anymore" |
|
Spyder
Newbie Joined: 17 November 2004 Location: Australia Status: Offline Points: 29 |
Post Options
Thanks(0)
|
OK, that worked inside the menu but not for the tooltip. A decent enough workaround for now...
|
|
nighthawk
Senior Member Joined: 11 June 2004 Status: Offline Points: 167 |
Post Options
Thanks(0)
|
Another workaround would be to create two "find" menu items each with
their own keybinding. Make the F3 menu item invisible. In
the execute function, just duplicate the code for the two menu items or
have one menu item call the execute function again with the
CommandBarControl of the other menu item. I do this when I have
two menu items that do the same thing.
|
|
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
|
|
|
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 |