views:

103

answers:

5

When does one use OK+Cancel in a dialog and when "Save + Cancel". I have seen them used interchangeably. Is there a window standard?

+1  A: 

Use the one which makes most sense in your application but do not mix different styles.

If you have a question like:
"Do you want to delete this item?" => Yes/No.
"Would you like to save item before closing?" => Yes/No/Cancel
"All changes will be lost when closing this window." => OK/Cancel

As you see you really need to pay attention to the question/statement to display meaningful choices. But do not use different choices for the same question like:

Clicking the X: "Do you want to Exit?" => Yes/No
Selecting Exit in the menu: "Do you want to Exit?" => OK/Cancel

Sani Huttunen
+5  A: 

I don't think I've ever seen Save + Cancel outside the Save As... dialogs provided by Windows itself (if you're not using it but instead you have rolled your own, you're a bad, BAD person!), however OK should be considered a confirmation for an action or its description on screen while Save clearly points that you are about to save something.

For further reading, check these two links:

Esko
+2  A: 

With respect to message boxes, there is a de-facto standard: The Windows API MessageBox function supports the following combinations:

  • Abort, Retry, and Ignore.
  • Cancel, Try Again, Continue
  • OK
  • OK, Cancel
  • Retry, Cancel
  • Yes, No
  • Yes, No, Cancel

So, if one of those combinations fits your need, you should probably use it, since users are familiar with these combinations. Of course, using Windows API (accessible through System.Windows.Forms.CommonDialogs, System.Windows.Forms.MessageBox, etc.) is usually better than designing your own UI: It's less work and the user gets a consistent user interface across applications.

Heinzi
Try to avoid using Retry, Ignore and Abort. Those actions are too complicated and scare most users. The WPF MessageBox no longer supports those actions. See http://msdn.microsoft.com/en-us/library/system.windows.messageboxbutton.aspx
Pierre-Alain Vigeant
A: 

In the vast majority of cases, I default to OK and Cancel for one very simple reason: They're simple, easy to understand, and everyone knows what they mean.

In my (limited) experience, there's no reason to agonize for any lengthy period of time over alternate button text when those two have been around for ages and do the job just fine.

The only time you really need to consider alternate button text is if there are more than two buttons on your window, or if the result of clicking OK wouldn't be patently obvious. And in the second case, I'd suggest that your window needs to be redesigned, not the text on the OK button.

Mike Hofer
A: 

Windows standards for command buttons (and modern standards for other platforms) recommend that you label the button with the action it commits, rather than simply "OK." Thus, label a button Search if it searches, Buy if it buys, Register if it registers, and so forth. The label Save implies the user is saving the underlying document or data for which the dialog was opened. To avoid confusion, do not use to mean saving the parameter settings in the dialog.

In general, the label of the button that executes the action that the dialog is for should be the same as the title of the dialog, which should be the same as the menu item or button label that opened the dialog in the first place (the latter ending in an ellipsis). This provides a common lexical thread for the user to tie the sequence of navigation together.

Labeling the button with its action (rather then OK or Yes) is also important because it confirms for the users exactly what they’re about to do. If users look at nothing else in a dialog or message box (and often they don’t), they’ll look at the execution button in order to click it. If they thought they were formatting but instead see a button labeled Detonate, maybe they’ll recheck their work.

Use OK only if you don’t have a more specific verb, such when acknowledging an error message, or confirming changes to a feature’s settings (e.g., a properties or options dialog).

Michael Zuschlag