c# - How to open a toolbar menu by Keyboard short-cuts? -
I have a blank toolbar button on my form and I'm adding all its menus and menu items at run-time . I have to add a keyboard shortcut in this toolbar menu How can you do this?
You can use the special symbol in the menu item text to mark the "& amp; key on this simple example Take a look:
Edit: 1) If there is a text in the drop down button, then it's' & amp; symbol for the menu. Like to drop. Therefore, in this specific case, the "verb" string has been assigned to that point at some point in the code, it must be "more actions". 2) If it Evl image drop down (the text is not visible buttons) Unfortunately '& amp;' The symbol trick does not work, but you can do this, for example, something like that. Pseudocode : Hope this helps. < / P>
Secure Override Zero OnkDown (KeyEver ER) {if (E.Alt & amp; e.KeyCode == Keys.A) {toolStripDropDownButton1 ShowDropDown ();} Base.OnKeyDown (e);}
Comments
Post a Comment