The control menu lists, in alphabetic order, all the controls that you can
put in a dialog box. The sample dialog is Sample
Dialog Template File. To add controls for a sample dialog, follow these
steps:
- Select Text from the Control menu
or select a control by clicking on its icon on the Control Palette at the
right side of the window.
The pointer becomes a small plus sign (+) in a square. The center marks
the position where the center of the control will be.
- Position the pointer inside the dialog box near
the upper-left corner and click the mouse.
- Type Student Level: in the Text entry
field. Observe that the next sequential integer is supplied in the Symbol
entry field. Press Enter.
- Replace the symbol with ID_GRAD and press
Enter.
The Dialog editor assigns the next integer to the symbolic identifier you
entered and places it in the include file. This is another technique for
entering symbolic identifiers.
- To view or change the include file at any time,
select Symbols from the Edit menu. The Symbols dialog
appears.
The symbolic and integer identifier for the dialog box and the text control
are displayed in the list box. The dialog allows you to add, delete, and
change the identifiers and to view the hexadecimal equivalents of the integers.
Select the OK push button to remove the dialog and register any changes.
Select Cancel if you have not made any changes.
- In your dialog box, the static control is not
large enough for you to see all the text. To remedy this, click on the text,
and a border appears around it. Drag the right-hand edge of the border to
the right to enlarge the field.
When you release the mouse button, you should be able to see all the text.
When a control has a border around it, it is selected and you can use a
shadow box to position it, as you did with the dialog box.
- To add another control, select Radio Button
from the Control menu and position the cursor just beneath the
Student Level text. Press Enter.
- Type Elementary in the Button Text entry
field and press Enter. Drag the right edge of the border that surrounds
the radio button until you can see all of the text.
- Select Radio Button again and type Intermediate
in the Text entry field. Position this radio button below the first
one.
10.
Select Radio Button again and type Advanced
in the Text entry field. Position this radio button below the other
two.
11.
Select Group Box
from the Control menu. Position the cursor to the right of the
column of radio buttons and press Enter.
12.
Type
Media in the Text entry field and press Enter to title the group
box.
13.
Click on the lower-right
corner of the group box border and drag it diagonally down and to the right
to enlarge it. The bottom of the group box border should be lower than
the last of the radio buttons, and the right-hand side of the group box
should be almost at the far right of the dialog box. This is to make room
for a group of check boxes that will go inside the group box.
When you use group boxes to group controls, you always create the group
box before the controls that are to go inside it.
14.
Select
Check Box from the Control menu. Position the cursor inside
the group box in line with the first radio button in the list, and click
the mouse.
15.
Type TextBooks
in the Button Text entry field and press Enter. Enlarge the border
of the check box until all of the text is displayed.
16.
Select
Check Box again and position the cursor below the first check box.
Type Video in the Text entry field and click Enter. Enlarge the
check box border until all of the text is displayed.
17.
Select
Check Box again and position the cursor below the previous two check
boxes. Type Diskettes in the Text entry field.
In the left-hand side of the dialog box, you should now have a column of
radio buttons with a heading of Student Level, and on the right a
group box with a heading of Media that contains three check boxes.
18.
Finally, add three push
buttons to the dialog box. Select Pushbutton from the Control
menu. Position the cursor in the lower-left side of the dialog box and
click the mouse. Type OK in the Text entry field and press Enter.
19.
Position another push
button to the right of the first one (in the lower middle of the dialog
box) and type Cancel in the Text entry field.
20.
Select
a third push button and position it to the right of the second. Type Help
in the Text entry field.
The dialog box and its controls are now complete.
Try selecting each of the controls, and observe the information
in the Selected Item Status. It holds information about each control
that you edit.
You might now want to test the dialog box.
[Back: Using the Options Menu]
[Next: Changing the Dialog Box]