• No results found

Using Dialog Boxes

In document Using Ms-dos 6.22 (Page 98-101)

As you work with the DOS Shell, the program routinely displays messages and prompts in pop-up boxes, called dialog boxes, onscreen. Any menu item that ends with an ellipsis displays a dialog box when you choose the item. When you choose Copy from the File menu, for example, the Copy File dialog box appears (see Figure 4.6).

4 I

Part

Ch

Table 4.1 Continued

Key Function

Figure 4.6 The Copy File dialog box.

Dialog boxes fall into two general categories: those that request information and those that provide information. The Copy File dialog box in Figure 4.6 is an example of a dialog box that requests information. Pressing F1, by contrast, displays a dialog box that provides information and is titled MS-DOS Shell Help (see Figure 4.7). This help screen assists you in learning the Shell.

All dialog boxes are built from a standard set of elements: text boxes, list boxes, option but-tons, option check boxes, and command buttons. The following sections explain how to use each element.

Using a Text Box

When you need to type information in a dialog box, the Shell includes one or more rectan-gular fields known as text boxes. The Copy File dialog box shown in Figure 4.6 contains two text boxes, one labeled From and one labeled To.

68 Chapter 4 Using the DOS Shell

To make an entry in a text box, you first highlight the box. Using the mouse, move the mouse pointer to the box and click the left button. Alternatively, you can press Tab or Shift+Tab repeatedly until the text box is highlighted.

Often, the Shell provides a default value in each text box. The text boxes in Figure 4.6, for example, include the default values AUTOEXEC.BATand C:\. When you select a text box, the Shell highlights any default contained in that text box. Typing new text in the text box replaces the default value.

Sometimes you don’t want to replace the entire default value in a text box. When you want to edit the value, press the right- or left-arrow key to cause the Shell to remove the high-lighting. You then can edit the existing entry.

After you make the desired entry or change the value in the text box, press Enter to accept the value that is displayed in the text box. When you press Enter, the Shell also closes the dialog box and executes the command, if any, with which the dialog box is associated.

Using a List Box

Some dialog boxes contain information or a list of choices displayed in a rectangular area, referred to in this book as a list box. A title bar appears at the top of each list box, as well as a scrollbar on the right side of the list box. Refer to Figure 4.7, which shows a help dialog box containing a list box titled File List Overview.

Often the text or list is too long to fit in the list box, so the Shell enables you to scroll verti-cally through the contents of the box. To scroll through a list box, use your mouse and the scrollbar, or use the cursor-movement keys.

Using Option Buttons

Some dialog boxes require that you use option buttons (also called radio buttons) to select command settings. Each option button is a circle (a pair of parentheses if your screen is in text mode) followed by a command setting. Option buttons always occur in groups—never alone. The buttons in each group are mutually exclusive; only one button can be selected at a time.

Figure 4.7 The MS-DOS Shell Help dialog box.

Using the DOS Shell Menus 69

The File Display Options dialog box shown in Figure 4.8, for example, contains option but-tons listed on the right side of the dialog box, beneath the label Sort By. Displayed filenames can be sorted by name, extension, date, size, or disk order, but the Shell does not sort files by more than one of these parameters at a time.

4 I

Part

Ch Figure 4.8

The File Display Options dialog box.

You can execute the command associated with a dialog box by pressing Enter, even though the cursor is not in the OK command button (as long as the cursor is not on one of the other command buttons).

To select a different option button, use the mouse to click the desired option button.

Alternatively, press Tab or Shift+Tab to move the underscore (cursor) to the group of option buttons. Then, use the up- or down-arrow key to move the dot to the desired button. Press the spacebar to select the new option. Press Enter to close the dialog box and execute the command, if any, with which the dialog box is associated.

Using Option Check Boxes

Some Shell dialog boxes enable you to select the desired command settings by “checking”

the appropriate option check boxes. An option check box is a pair of brackets followed by a command setting. The File Display Options dialog box in Figure 4.8, for example, contains the following check boxes:

Display Hidden/System Files

Descending Order

An option check box turns a command setting on or off. The setting is checked (or on) when an X appears between the brackets. The setting is off when the space between the brackets is blank. To toggle the setting on or off, use the mouse to click between the brack-ets. Alternatively, press Tab or Shift+Tab to move the cursor to the option check box and then press the spacebar. Each time you click the box or press the spacebar, the option tog-gles on or off.

70 Chapter 4 Using the DOS Shell

Using Command Buttons

After you make any desired entries in text boxes, select appropriate option buttons, and check the correct check boxes, you are ready to execute the DOS Shell command. To do so, choose one of the command buttons. Most dialog boxes in the DOS Shell contain three command buttons: OK, Cancel, and Help (refer to Figure 4.8). The OK command button activates the choices you made in the dialog box and executes the command, if any, with which the dialog box is associated. The Cancel command button aborts any changes you made in the dialog box and returns to the DOS Shell window. The Help command button accesses the Shell’s online help facility.

To execute a command button, use one of the following methods:

Move the mouse pointer to the desired command button and click the left mouse button.

Press Tab or Shift+Tab to move the cursor to the desired command button and press Enter.

In document Using Ms-dos 6.22 (Page 98-101)