When designing a DialogBox, you should follow all the same layout principles as for other applications areas. DialogBoxes are usually transitory. The user usually wants to simply respond and get back to the primary tasks of the application. To help the user respond quickly, there are a number of common DialogBox actions. By using and ordering these actions consistently, you provide the user with cues to quickly respond to each DialogBox.
When a DialogBox is displayed, all components within the DialogBox should reflect the current state of the application. For example, if the DialogBox is used for changing the current font in a text editor, the DialogBox should be initially displayed with the current font. If the DialogBox is modeless, then any changes to the application should be updated in the DialogBox.
DialogBoxes can limit how a user can interact with other windows in order to force the order of interaction. These limitations, which are called modes, are described in the following text.
Remember that the guidelines presented in this section,
like all the guidelines in this
guide,
apply only in a left-to-right language
environment in an English-language locale.
You need to make the appropriate changes for other locales.
Common DialogBox Actions
While your application can sometimes require special DialogBox actions, most share common actions. The common actions provide a consistent means for the user to quickly respond to DialogBoxes and get back to the primary application tasks. The common actions should be presented in a horizontal collection of PushButtons at the bottom of the DialogBox, separated from the rest of the DialogBox by a Separator.
No DialogBox will contain all of the common actions in the following list. You should use the ones appropriate to your application or determine new actions so they do not conflict with the common actions listed. If you create a new action, you should give it an active-voice label that indicates its purpose. An active-voice label describes the action that pressing the button causes. The actions are listed in the approximate sequence in which they should appear in DialogBoxes as follows:
If a DialogBox action causes an error, the DialogBox should not be dismissed before the error is displayed. Instead, the DialogBox should remain available after the error is dismissed to give the user a chance to correct the error and reuse the DialogBox. If the actions to be performed by OK or Apply depend on the state, then these Labels should be replaced by ones that indicate the action to be performed.
You should arrange PushButton actions in DialogBoxes in the same way you arrange other PushButtons, according to order and frequency of use. The common action PushButtons should be ordered as presented in the previous section. Positive responses to the DialogBox should be presented first, followed by negative responses, and canceling responses. Help should always be the last action on the right.
The following rules should be used when determining what default buttons to place in a DialogBox:
OK Cancel
OK Cancel Help
OK Apply Cancel
OK Apply Cancel Help
OK Apply Reset Cancel
OK Apply Reset Cancel Help
OK
OK Help
Yes No
Yes No Help
It is possible that both the Yes and No actions of a Question DialogBox will perform an action. If this is the case, the Question DialogBox should use one of the following button arrangements:
Yes No Cancel
Yes No Cancel Help
Yes No
Yes No Help
OK Cancel
OK Cancel Help
Close
Cancel or Stop
Pause Resume
Help
Your application determines the size and location of its DialogBoxes. You should size and place DialogBoxes so that they do not obscure important information in other windows of your application. The initial size of a DialogBox should be large enough to contain the dialog components without crowding or visual confusion, but otherwise should be as small as possible. DialogBoxes should follow the same rules for resizing as a MainWindow as described above.
You should place DialogBoxes on the screen so they are completely visible.
In general, you should place DialogBoxes close to either the component that caused it to be displayed, the current action, or the information needed to respond to it. When a DialogBox relates to an item in an underlying window, you should position the DialogBox to the right of the item. If there is not enough room to the right of the item, try to position the DialogBox to the left, below or above the item, in that order, depending on screen space available. You should only obscure related information as a last resort.
If a DialogBox does not relate to items in the underlying windows, the DialogBox should be placed centered in the application's work area.
If two DialogBoxes need to overlap, you should offset the top DialogBox to the right and below the title of the lower DialogBox. Use your best judgement, knowing that the screen area for DialogBoxes is limited.
While the previous suggestions seem simple enough, they cannot always be followed completely. Therefore, DialogBoxes, once displayed, should be movable so that the user can relocate them as needed to see information in underlying windows.