mnemonic best practices

  • Thread starter Thread starter Tim Rogers
  • Start date Start date
T

Tim Rogers

Let's say you have a form with two text boxes and a label that proceeds each
text box. The tab order is label1, textbox1, label2, textbox2. You put a
mnemonic on each label such that when the user chooes that mnemonic the text
box that follows the label in the tab order gets focus.

Given this scenario, here is the question: If, for instance, textbox1 is
disabled and therefore cannot receive focus, should you remove the mnemonic
on label1? If you don't, choosing the mnemonic for label1 will cause
TEXTBOX2 to receive focus. Is this considered expected behavior in a
windows form-based GUI?

Thanks,

Tim Rogers
 
I recommend disabling the label and the text box together-
not removing the mnemonic. Removing/restoring the mnemonic
would be a royal pain - especially if your UI is
translated to multiple languages. You would then have to
have two versions of the label strings for each language
in a separate strings resource file.
 
Back
Top