Eliminating Unnecessary Dialog Boxes

You can eliminate unnecessary dialog boxes in several ways. The most commonly used techniques are

  • Combining multiple dialog boxes into a single dialog box.
  • Direct manipulation.
  • Incorporating the dialog box into the window.
  • Appropriate defaults.
  • Automatic processing.
  • Toolbars.
  • Status bars.

Let's look at each of these techniques in detail.

Combining Multiple Dialog Boxes into a Single Dialog Box

The goal behind this technique isn't to eliminate all dialog boxes used to perform a command but to have fewer of them. Instead of using multiple related dialog boxes or cascading dialog boxes, combine them into a single dialog box. Such a dialog box could be a property sheet or a dynamic dialog box. Similarly, you could just combine two simple related dialog boxes into one larger dialog box, assuming that the resulting dialog box isn't too large or complicated. A good example is the new Page Setup common dialog box in Windows, shown below, that incorporates the settings found in the old Print Setup dialog box and the old Page Setup dialog box. Why use two dialog boxes to set up your printer when one will do?

TIP
Consider combining several related dialog boxes into a single dialog box.

As another example of dialog boxes that might be combined, have you ever run the ScanDisk utility and received a problem report such as this?

Receiving one or two problem reports like this isn't a problem, but it's a bit much when you receive hundreds of such messages, which is possible for the particular problem being reported. Such dialog boxes are definitely unnecessary. A far better approach would be for the ScanDisk utility to report problems as they are found using a list view control, similar to the way that the Find utility displays the files it finds.

Direct Manipulation

Direct manipulation is when an object is visible on the screen, the user can interact directly with the object, and immediate feedback is given showing the results of the interaction. The most common direct manipulation techniques used in Windows are selection, dragging and dropping, clicking or double-clicking, moving or sizing, context menus, tooltips, and text entry. I find that dragging and dropping and tooltips are especially effective in eliminating the need for dialog boxes. For example, the tooltips used in the Visual C++ debugger allow you to obtain a tremendous amount of information simply by moving the mouse around.

Windows Explorer provides a good example of eliminating a dialog box that works through selecting, clicking, and text entry. To rename a file or folder in Windows Explorer, you select the item, click it to make it editable, and then type in the new name. This approach is much more graceful than using a dialog box to rename a file.

While direct manipulation is an excellent way to perform many commands, it does have drawbacks. For instance, sometimes it isn't obvious that an object can be manipulated, making direct manipulation a poor choice for beginning users. This suggests that you might need to provide a dialog box in addition to the manipulation to accommodate beginning users. Interestingly, Windows Explorer also provides a menu command to rename a file or folder. Selecting the Rename command just makes the item editable, but the menu command is more visible than the direct technique. The other problem is that direct manipulation isn't especially accessible, so again you might want to consider providing a dialog box as an alternative for those who prefer it.

Incorporating the Dialog Box into the Window

One simple technique for eliminating dialog boxes was inspired by the Web: incorporating information that would otherwise be in a dialog box directly into the window. For example, if you want to search for text in a message when using Microsoft Outlook, the search screen is incorporated directly into the window, as you can see in the graphic below.

click to view at full size.

Another good example is Windows Explorer in View As Web Page mode. The most important information about the selected file is displayed on the left-hand side of the Files window, largely eliminating the need to view a file's property sheet. Interestingly, although Windows Explorer displays useful information about selected files and folders, it doesn't do the same for selected drives. It would be useful to see the drive information displayed on the General tab of a drive's property sheet.

click to view at full size.

Appropriate Defaults

Alan Cooper observes that questions are not choices; questions demand answers now, whereas choices can be made as desired. One example of presenting choices instead of questions is with direct printing, which is used by the Print toolbar button in Microsoft Office and supported by MFC. Instead of demanding that the user indicate which printer to use, the number of copies, the page ranges, and so on, direct printing prints one copy of all pages to the currently selected printer. Direct printing allows the user to not bother with the Print dialog box except when necessary.

Another common technique of using appropriate defaults can be seen in just about any HTML editor, such as the Microsoft FrontPage Editor. An image in HTML can have several properties, such as a type, size, text description, and hyperlink. However, when you insert such an object, the editor uses default properties. It doesn't demand this information immediately; rather, you can set the properties when you want to. Consider how much harder it would be to have to set properties every time you inserted an object. In this case, the dialog box itself is necessary, but it isn't necessary to display it every time the user inserts an object.

TIP
Create objects using appropriate defaults to free the user from having to set properties.

Automatic Processing

Another way to eliminate unnecessary dialog boxes is to have certain tasks performed automatically. A good example is the spelling and grammar check feature in Word. Word displays wavy red lines under suspected spelling errors and wavy green lines under suspected grammatical errors. The standard approach (still used by the Spelling and Grammar menu command) is to present a dialog box that displays one problem at a time and to give a variety of message boxes along the way. The visual feedback method of underlining provides the same functionality yet eliminates numerous dialog boxes and message boxes.

Automatic processing is also performed by the IntelliSense features used by Word, including the following:

  • The AutoCorrect feature, which automatically fixes common spelling errors.
  • The AutoFormat feature, which automatically capitalizes the first word in a sentence, automatically creates numbered and bulleted lists when you start a list with a number or an asterisk, and automatically carries out similar functions.
  • The AutoComplete feature, which automatically suggests the rest of the word or phrase that you are typing.

Since these features are performed automatically, no dialog boxes are necessary.

Toolbars

Toolbars are functionally equivalent to modeless dialog boxes, but they are far more convenient. When a toolbar is docked to the program frame, it has the advantage of not obscuring the document window. If you undock a toolbar, it behaves exactly like a modeless dialog box, and it has a distinct visual appearance that makes it impossible to confuse with a modal dialog box. The advantage of a toolbar over a modal dialog box is that it doesn't break the flow, as discussed earlier in the Font dialog box example.

In Visual C++, you can search for text by using either a modal dialog box or the toolbar. All the options available in the dialog box version are also available in the toolbar version. However, since toolbar space is limited, most users put only the search options that they use often on the toolbar. Then the dialog box version is required only for unusual searches.

The Visual C++ Find in Files toolbar button uses an interesting technique that eliminates the need for a dialog box. The Find In Files toolbar button remains depressed during a search that is still active. If you are performing a search that is taking a long time and you decide to cancel, you can click the toolbar button again to cancel the search. This technique eliminates the need to display a progress dialog box with a Cancel button.

TIP
Use the toolbar to cancel toolbar commands.

Status Bars

Clearly, status bars are good only for displaying status-related information, but using a status bar to display such information is much more effective than using a dialog box. Try to display something more useful than Ready on your status bar, which is what is displayed by default in MFC programs.



Developing User Interfaces for Microsoft Windows
Developing User Interfaces for Microsoft Windows
ISBN: 0735605866
EAN: 2147483647
Year: 2005
Pages: 334
Authors: Everett N McKay
BUY ON AMAZON

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net