Print Page | Close Window

Multiple keybindings for one ID

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=1520
Printed Date: 29 September 2024 at 6:47pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Multiple keybindings for one ID
Posted By: Spyder
Subject: Multiple keybindings for one ID
Date 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?



Replies:
Posted By: Boyd
Date Posted: 13 December 2004 at 6:47pm

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).



Posted By: Spyder
Date Posted: 13 December 2004 at 7:35pm
I'll try that, but according to the docs:

"This property is obsolete and is not used anymore"


Posted By: Spyder
Date Posted: 13 December 2004 at 7:53pm
OK, that worked inside the menu but not for the tooltip. A decent enough workaround for now...


Posted By: nighthawk
Date Posted: 14 December 2004 at 12:31am
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.


Posted By: Boyd
Date Posted: 14 December 2004 at 7:59am
Originally posted by Spyder Spyder wrote:

"This property is obsolete and is not used anymore"
They restored (or altered) the functionality in one version not too long ago to serve this purpose.  They never updated the documentation.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net