• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Just click a button to make it do what its label says. In Figure 3-2, the Browse button is typically used to display a file dialog box. When you choose a file and click OK, the name and location (also known as the path) of the file is automatically entered into the text field. This synergy of controls is common, saves typing, and prevents typos. Some applications place a small folder icon next to a text field rather than the full-sized text field, but the usage is the same.

Figure 3-4. The Browse button is marked with ellipses (...), implying that another window will appear when it is clicked

If the button has the focus, press the spacebar to activate it. In dialogs with more than one button, often one of them has a thicker border than the rest (usually the OK button)—this is the “default” button and can be activated by pressing Enter, regardless of which control has the focus. Similarly, there is usually a cancel button (usually labeled “Cancel”) that responds to the Esc key, but that has no visual distinction. If in doubt, use Tab to cycle through the buttons, and then press Space.

Figure 3-3 shows some special cases in which buttons work differently or have special meaning:

Figure 3-5. Toggle buttons, typically on application toolbars, allow you to turn options on or off by clicking

Toggle buttons

Some buttons, typically custom controls or buttons on toolbars, are used to change a setting, and will simply stay pushed in until clicked a second time. There’s no rule that makes these buttons look different from standard buttons, so you’ll have to rely on experience to determine which are “toggles.” For example, the B or I buttons (corresponding to bold and italic, respectively) commonly found on word processor toolbars are toggles, but the Save and Print buttons are traditional buttons and are used to carry out a command rather than to change a setting.

The default button

When a set of buttons is displayed, typically at the bottom of a dialog box, one button will be the “default,” meaning that it will be the one activated by the Enter key. It’s identified by a thicker border (not to be confused with the dotted rectangle signifying the focus, discussed at the beginning of this chapter). Not all dialog boxes have a default button, but when it’s there, it’s usually the OK button.

The Cancel button

Much like the default button, a single button is often set as the Cancel button, meaning that it will be activated when the Esc key is pressed (regardless of which control has the focus). The Cancel button has no visual distinction from any other buttons.

OK, Cancel, Apply

Most dialogs will have at least an OK and a Cancel button, and many also have an Apply button. Typically, OK is the “default button,” and Cancel is the “cancel button.” Both the OK and Apply buttons accept whatever settings you’ve entered, but the OK button closes the window, while Apply leaves it open, allowing you to make more changes. Finally, Cancel closes the window without applying your settings. (See Figure 3-4.)

Figure 3-6. Click OK to accept your changes and close the dialog, Cancel to discard your changes, or Apply to accept your changes while leaving the dialog open for later changes

What may be confusing is what happens when you click Apply and then Cancel. The assumption is that the settings that were “applied” are not lost, but any that were made after Apply was clicked are ignored. Theoretically, the behavior should be the same as though you clicked OK, then reopened the dialog, and then clicked Cancel. But don’t be surprised if some applications respond differently; Microsoft has never been clear with application developers about the expected behavior in this situation.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint