Skip to content

Instantly share code, notes, and snippets.

@jtacoma
Created October 23, 2014 16:39
Show Gist options
  • Save jtacoma/30a17241f59f869e49ea to your computer and use it in GitHub Desktop.
Save jtacoma/30a17241f59f869e49ea to your computer and use it in GitHub Desktop.
Dialogues don't have menu bars

A dialogue box doesn't have menu bars, tool bars, tool strips, ribbons, or status bars. A dialogue box has one or more buttons near the bottom. Clicking on a button that is labelled Ok, Cancel, Yes, or No normally closes the dialogue but this can sometimes be circumvented e.g. by an error about missing or malformed data, or by saying No in response to a subsequent dialogue that asks, "Are you sure?" Some authorities distinguish dialogue boxes from message boxes by the latter's inability to receive any user input beyond which button was pressed, but they are otherwise the same.

  • A dialogue box cannot be maximized or minimized.
  • Closing a dialogue box has the same effect as clicking its Cancel button if the dialogue box has a Cancel button, otherwise the No button. If a dialogue box has no such button, it should not be possible to close the dialogue box without clicking a button.
  • When the keyboard focus is on a dialogue box that has a Cancel button, pressing the Esc key is equivalent to clicking Cancel. Otherwise, if the dialogue box has a No button, pressing the Esc key is equivalent to clicking No.
  • When the keyboard focus is on a dialogue box that has an Ok button, and the keyboard focus is not in a multi-line text field, pressing the Enter key has the same effect as clicking Ok.

An application window may have a menu bar, one or more tool bars, strips, or ribbons, and/or a status bar. An application window does not have buttons labelled Ok, Cancel, etc.

A window or box that has a Cancel button that closes it as well as a menu bar or a tool strip is broken by design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment