Common Desktop Environment: Style Guide and Certification Checklist

Dialog Box Design and Layout



Keep the size of your dialog boxes to a minimum. Remember that on low-resolution displays, dialogs may take up most of the screen real estate, and may even run off the edge of the screen if not designed correctly. 



Avoid complexity in your dialog boxes. If your dialog box must support many functions, consider using an expandable dialog box (see "Expandable Windows" on page 291), or use more than one dialog in a nested fashion. 



Avoid the use of resize handles in your dialog box. However, you may use resize handles when resizing is useful in allowing users to see more information; for example, when your dialog contains a scrolling list that is likely to be quite long, and users will frequently need to search the list. 



The title of dialog boxes used within your application adheres to the conventions listed in Table 10-3 



Every dialog box in your application has at least one button that either performs the dialog box action and dismisses it or dismisses the dialog box without taking any action. 



If your application uses common dialog box actions, the actions have the following specified functionality and labels: 








Indicates affirmative response to a question posed in the dialog box. 




Indicates negative response to a question posed in the dialog box. 




Applies any changes made to components in the dialog box and dismisses the dialog box. 




Applies any changes made to the components in the dialog box, performs the action associated with <command>, and optionally dismisses the dialog box. 



The <command> button should be used in lieu of OK, Yes, or No as a button label when it provides more meaning to the user as to the action that will be performed when that button is clicked. 




Applies any changes made to components in the dialog box and does not dismiss it. 




Causes the task in progress to be attempted again. 




Ends the task in progress at the next possible break point. 




Causes the task in progress to pause. 




Causes a task that has paused to resume. 



Save As Defaults 

Saves the current settings as the default settings that will appear the next time the window is displayed. The settings are not applied to any selected object and the dialog box is not dismissed. 

A Save As Defaults button should be provided if it is expected that a user would want to use different default values for a set of controls within a dialog box than those that you provide as the factory settings. For example, a Save As Defaults button might be provided in a "New <object type>" window, allowing the user to indicate that whenever a new instance of that object-type is created, the current values should be displayed as the defaut settings instead of the values given by the application. 




Cancels any changes that have not yet been applied by your application. The controls within the dialog box are reset to their state since the last time the dialog box action was applied. If no changes have been applied within the current invocation of the dialog box, the controls are reset to the state when the dialog box was first displayed. 



Reset to Factory 

Cancels any changes that have not yet been applied. Components in the dialog box are reset to their default state and value as specified by the vendor that delivered the application (that is, the controls are restored to the original factory settings). 




Dismisses the dialog box without performing any actions not yet applied. 




Provides help for the dialog box. 



Any visible control that is not currently active or whose setting is currently invalid is dimmed. 

Dimmed controls cannot be activated by the user and should appear only when the inactive state is short-term (that is, there is something the user can do within the application or the desktop environment to make the control become active). When the control is persistently inactive (because of the current configuration of the application or system, or a particular set of companion software is not currently installed), the control should be removed rather than dimmed. 



Every dialog box in your application has exactly one default button that is activated when the Return key is pressed. 

The default button should be associated with the most likely response from the user and should not be potentially destructive or irreversible. Some applications may have dialog boxes that do not reveal a default button until a specific set of fields has been filled out or otherwise manipulated. 



If a dialog box displayed by your application has controls that are considered to be advanced features, use an expandable dialog box, or use a multiple page dialog box that provides a <category> option menu that allows a user to navigate to each page. 

Controls that relate to advanced features should not be displayed with the set of options initially displayed to the user. The typical user should be presented with only those options that are necessary to use the basic functionality of the application. Users looking to access advanced functionality within the dialog box may use the Category option button (see Figure 7-1). If the number of advanced controls is very few, or the settings for these controls are highly related to the settings of basic controls displayed in the dialog box (that is, the settings of the advanced controls change when the user changes settings for basic controls), you might choose to provide an expandable dialog box (see the section on Expandable Windows and Dialog Boxes). 

Figure 7-1 An example of using a Category option menu in a dialog




Controls within your dialog box are placed in a left-right, top-down layout based on the order in which the user is expected to fill out or choose options within the dialog box. 

This assumes that your application is being designed for a left-to-right language environment. Alternate design approaches may be necessary for other locales. 



Push buttons that affect the dialog box as a whole, either by modifying its contents or layout, invoking the action of the dialog box, or dismissing the dialog box, are located at the bottom of the dialog box. 

In general, there should only be one row of buttons at the bottom of a dialog box. If your application has dialog boxes that contain several global buttons, it may be necessary to create two or more rows of buttons at the bottom of the dialog box. The last row should contain the standard dialog box buttons (OK, Reset, Cancel, and Help). If a dialog box contains buttons that are not related to the dialog box as a whole, but instead, relate to a specific control within the dialog box, the buttons should be located near the control to which they relate. 



If your application provides an Apply button within a dialog box, it also provides an OK button or command button that performs the dialog box action then dismisses it. 



Your application does not use cascading buttons within dialog boxes unless there is absolutely no other design alternative that can be used without a negative impact on the layout of your dialog box. 

In general, cascade buttons should only be used within menus and menu bars. You should avoid their use in all other locations unless absolutely necessary.