Dialog Box Definition

A dialog box is a small window or message box that appears temporarily in a GUI (graphical user interface) to alert the user to a condition and/or to request information.

Dialog boxes appear on top of other open windows and whatever else is currently on the display screen, and they are sometimes accompanied by a beeping or other sound effect. They always contain at least one button, the purpose of which is to allow the user to close the box (i.e., remove it from the display screen). Often they also contain additional buttons and one or more means for users to provide information, such as check boxes and spaces to enter text.

Dialog boxes can be classified in several ways, including according to the function they perform and their complexity. The simplest type of dialog box is the Alert, which displays a message and requires the user to acknowledge it by clicking on a button in order to close it. Alerts are commonly used to provide simple confirmation of an action (such as to confirm that the user really wants to terminate a program), to indicate a user error, and to provide notification that a program that has stopped functioning (i.e., frozen or crashed).

Dialog boxes can also be classified by whether they are modal or non-modal. Modal dialog boxes are those which temporarily halt part or all of the GUI until the user closes the box and, depending on what caused the box to appear, provides some information. System modal dialog boxes freeze the entire GUI, application modal dialog boxes freeze just the application that caused the box to appear, and document modal dialog boxes, the newest and least intrusive modal type, merely freeze a single window in an application (such as a document in a word processing program).

Non-modal dialog boxes, also called modeless dialog boxes, are used when the requested information is not essential to continue, and thus no windows or other parts of the GUI are frozen.

A commonly encountered type of dialog box on Linux is that which appears when an ordinary user tries to open a program that requires root (i.e., administrative) permission. For example, when a user attempts to open kppp, the KDE Internet dial-up utility, a small, non-modal dialog box appears that asks the user to enter the root password in a text space labeled Password for root. Entry of the correct password and clicking on the OK button causes this box to close and a secondary (again, modeless) box to appear. The second box allows the user to modify the connection setup if desired and to push a button labeled Connect that initiates the connection to the Internet.

The Microsoft Windows and Macintosh operating systems use an ellipsis (i.e., three consecutive dots) after GUI menu items to indicate that clicking on such items will not result in a direct action but rather will open up a dialog box that provides additional information and options for the user.

One problem with the design of some operating systems and application programs is that dialog boxes are inappropriately used and/or poorly designed. For example, they may appear when not really necessary and/or contain cryptic messages that most users cannot understand. This can be frustrating for users and waste their time and energy.

An excellent example of inappropriate use is provided by some web browsers that open a dialog box that informs the user that a page will not display, even though it is obvious that the page will not display, and requires the user to click on a button to close the box. Moreover, if the user is working on another application with the browser in the background, the dialog box will interrupt that application and move the browser window to the foreground, thus requiring the user to also restore the application window to the foreground after closing the dialog box. A well-known example of clumsy and misleading wording on a dialog box is the message that resembles You have performed an illegal action and this program will shut down.

Good software design calls for dialog boxes to (1) be used only where necessary and/or helpful, (2) be as unobtrusive as possible, (3) use wording that has meaning to users and (4) maximize user flexibility. This implies that dialog boxes should be non-modal whenever possible, and, if they are modal, they should be document modal or application modal to the extent possible.

The term popup window is also sometimes used to refer to a dialog box, although this term often implies an unrelated (and usually unwanted) advertisement, whereas a dialog box is related to the program, operating system or hardware currently being used,

Created December 25, 2005.
Copyright © 2005 The Linux Information Project. All Rights Reserved.