A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.
Thinking back, I've known about this on a user level for years, but it's only just occurred to me to stop and think "Huh?":
Consider the standard Windows message box, configured to display Yes and No buttons. The one you get by calling MessageBox with uType set to MB_YESNO (or as wrapped by your framework of choice). Notice anything strange about it?
No? OK. You see (pressing Alt if necessary under XP) how the Yes button has the Y underlined, and the No button has the N underlined? Standard Windows convention for accelerator keys? Well, the weird thing about _this_ dialog box is that *you don't have to press Alt* to fire the accelerator! Just pressing Y or N is the same as clicking the button!
This might not seem like a big thing. But I just happened to be using a dialog in <some app>, that was like MessageBox except it had a 'Do not show me again' check box. The programmer had correctly given the Yes and No buttons their accelerators; but I was dumbly bashing away at the N button, and wondering why nothing was happening.
Which is how I found this out about MessageBox. If you ask it to do Abort Retry Ignore buttons, then you can just do A R or I (no Alt) there. Strangely, if you supplement your uType with MB_HELP, you get an additional Help button with *no* accelerator (and H does nothing).
Checking other apps I can't seem to find much consistency in whether Alt is required for button / control invocations or not. What's *supposed* to be the rule? I can't find anything in the MSDN.
Funny, a post about message boxes just as I post about getting rid of message boxes: http://dualogy.blogs.com/phil/2006/05/nonmodal_user_i.html
Otherwise, yeah I have observed that at some point, too. That programmer must not have been a power keyboarder, which is strange for a programmer.
Wednesday, May 31, 2006
> What's *supposed* to be the rule? I can't find anything in the MSDN.
What about the MWUE? http://tinyurl.com/qgge6 says
Also define access keys to provide navigation to
controls within a secondary window. This allows
the user to access a control by pressing and
holding the ALT key and an alphanumeric key that
matches the access key character designated in the
label of the control.
Unmodified alphanumeric keys also support navigation
if the control that currently has the input focus
does not use these keys for input.
Thanks. :) It's something I want to sell at some point so looks are more important than they would otherwise be...
Wednesday, May 31, 2006
I think i read this somewhere, maybe even on this forum
Only reason MessageBoxes exist is because it is very hard to implement proper undo functionality
Wednesday, June 07, 2006
This topic is archived. No further replies will be accepted.Other recent topics
Powered by FogBugz