M
msoegrad
In doing some development and testing I have found a curious issue with
the use of Mnemonics and Accelerators that I would like some input on.
If you create a form that has 2 buttons on it, one with text "&Button1"
and one with "B&utton2" and set up event handlers for both you will see
a curious reaction with the accelerators. If nothing has focus the
Alt+key combination works fine. If one has focus it still works fine
but you can just press the key for the other button and that event will
still fire. IE if button one has focus and your press "u" Button2 will
fire as if you had pressed Alt-U. The application I am working on has
a list of options the user can select from that have hotkeys associated
with them that are 0-9 and A-H. At the bottom of the screen is a
button that is supposed to respond to the Alt-A keypress where the
others are just the single keypresses (no Alt-combos). However if you
press A, you not only go to the appropriate screen, but the dialog from
the button also opens up. Has anyone seen this before or know of a way
to correct this issue besides changing the Accelerator for the button.
the use of Mnemonics and Accelerators that I would like some input on.
If you create a form that has 2 buttons on it, one with text "&Button1"
and one with "B&utton2" and set up event handlers for both you will see
a curious reaction with the accelerators. If nothing has focus the
Alt+key combination works fine. If one has focus it still works fine
but you can just press the key for the other button and that event will
still fire. IE if button one has focus and your press "u" Button2 will
fire as if you had pressed Alt-U. The application I am working on has
a list of options the user can select from that have hotkeys associated
with them that are 0-9 and A-H. At the bottom of the screen is a
button that is supposed to respond to the Alt-A keypress where the
others are just the single keypresses (no Alt-combos). However if you
press A, you not only go to the appropriate screen, but the dialog from
the button also opens up. Has anyone seen this before or know of a way
to correct this issue besides changing the Accelerator for the button.