VS 2005 RTM + & Command in text {e.g. &Cancel}

  • Thread starter Thread starter Morgan
  • Start date Start date
M

Morgan

If I try to use &Cancel for the text on a button, the hotkey underline
doesn't show. UseMnemonic is set to true.

Could someone else try it and see if it work for them?


Thanks,

Morgan
 
Dont know if this is a bug or not, but it sure seems like one. The _ will
only appear when the Alt key is pressed.

This seems counter intuitive as the user wont know the hotkey until -after-
they press the Alt key. I thought the whole purpose of having the hot key
visible was for users to immediately see that _Char meant Alt+Key would
invoke action.

Is this force-feeding Vista behaviour and we'll no longer have static
visible hot keys?

--Morgan
 
Morgan,

As has already been said this is standard XP behaviour. I hate it
too!! There is an option hidden away somewhere to switch the
underlines back on but I'm not on an XP box at the moment so I can't
check where it is.

However, with regard to your specific example of the Cancel button :
Microsoft design guidelines state that the OK and Cancel buttons
shouldn't have an underline; this is because they should be mapped to
the Default and Cancel buttons, and therefore the Enter and Escape
keys, respectively, in which chase there is no need for the underline.

Martin
 
thanks for the clarifications...
I guess thats what I get for using the Windows "classic" mode...
 
Morgan said:
If I try to use &Cancel for the text on a button, the hotkey underline
doesn't show. UseMnemonic is set to true.

In addition to the other comments: It's unusual to assign the shortcut C to
cancel buttons. Instead, assign the button to the form's 'CancelButton'
property, which will make sure that the button is pressed if the user
presses the escape key.
 
Back
Top