Adding dialog box controls
After you create a default dialog box, you can add any of the following controls to a dialog box.
To specify the action performed when you select a control, right-click the control, and click Connect to connect the control to another control or display its value in a cell, or Links to specify the action to perform.
For more information about control properties, see “Properties of form controls.”
Bitmap buttons
A bitmap button displays a bitmap image on the face of the button. Bitmap buttons can imitate the behavior of all button types (for example, radio buttons).
Push buttons
You can add buttons to dialog boxes that can execute a macro, link to a Web site, or activate another custom dialog box when the button is clicked. Buttons do not have a value; buttons execute an event such as clicking instead of displaying a value that is transferred to a cell on a spreadsheet or to another control.
Check boxes
You can add check boxes to a dialog box. Each check box displays next to a default label.
Color controls
Adding color controls let you choose a color or create a custom color.
Combo boxes
You can add combo boxes, which are a type of list box that lets you add items to a list.
Label controls
You can add a label control to a dialog box. The label control lets you place text on the dialog box as a standalone feature or near a control that does not have a label, such as a rectangle control.
Edit boxes
Adding edit boxes to dialog boxes let you add data. The input data can be characters, numbers, cell addresses, or can make the typed data hidden.
File controls
A file control consists of a box for typing filenames and a browse button that displays a list of files on disk. Adding a file control lets you choose a filename, folder, and drive.
Group boxes
You can add a group box control, which acts as a container for other controls. Group boxes can contain radio buttons, check boxes, or buttons. These controls are considered child controls of the group box. You can use a group box to manage the controls it contains as a single unit. For example, when you move a group box in the dialog box, you also move the contents of the group box.
Scroll bars
Two scroll bar controls can be added to a dialog box: a horizontal scroll bar and a vertical scroll bar. Scroll bars let you scroll through a list of data to make a data selection.
List boxes
You can add a list box to a dialog box to list items which you can choose. The item that you choose becomes the value of the list box.
Radio buttons
Grouped radio buttons present a list of mutually exclusive choices. Only one radio button can be selected. When radio buttons are on a dialog box, the radio buttons are still mutually exclusive. The dialog box acts as a container for the radio button controls. When you want to use more than one set of radio buttons and have each set provide mutually exclusive choices on the same dialog box, place each set within a group box or rectangle.
Rectangle controls
A rectangle control performs the same function as a group box control. You can add a rectangle control to organize controls in a dialog box. Like group boxes, controls added to a rectangle become child controls.
Spin controls
Adding a spin control lets you enter numeric data by clicking arrows to increase or decrease the value of the spin control, or by typing the value.
Tab controls
You can add a tab control to organize settings in a notebook of controls. Clicking a tab displays controls associated with that tab.
Timer controls
You can use a timer control to run link commands at regular intervals or at a specified time. This is useful for creating toolbar controls that periodically retrieve current values from the active window.
To add a bitmap button to a dialog box |
1.
|
|
Click the Quick tab button at the bottom of the application window to display the Objects sheet.
|
2.
|
|
Double-click a dialog box.
|
3.
|
|
Click Insert Bitmap button.
|
4.
|
|
In the dialog box, drag diagonally to create the control.
|
5.
|
|
Right-click the control, and click Properties Bitmap.
|
6.
|
|
Choose a file.
|
•
|
|
You can add a custom bitmap image by copying a graphic to the clipboa
rd, right-clicking the bitmap button, and selecting Paste. |
•
|
|
You can select a button type for the bitmap image to imitate by right-clicking the bitmap button, and clicking Properties Button type.
|
To add a push button to a dialog box |
1.
|
|
Click the Quick tab button at the bottom of the application window to display the Objects sheet.
|
2.
|
|
Double-click a dialog box.
|
3.
|
|
Click Insert Push button.
|
4.
|
|
In the dialog box, drag diagonally to create the control.
|
•
|
|
You can make a push button close the dialog box by selecting OK exit button or Cancel exit button from the Button type choices in the Properties menu.
|
To add a check box to a dialog box |
1.
|
|
Click the Quick tab button at the bottom of the application window to display the Objects sheet.
|
2.
|
|
Double-click a dialog box.
|
3.
|
|
Click Insert Check box.
|
4.
|
|
In the dialog box, drag diagonally to create the control.
|
5.
|
|
Right-click the control, and click Properties Label text.
|
6.
|
|
In the Enter text box, type the label to display.
|
If you want to display the label to the left of the check box, right-click the check box, and click Properties Draw to right No.
|
•
|
|
The value of a check box is Yes when it is enabled and No when it is disabled.
|
To add a color control to a dialog box |
1.
|
|
Click the Quick tab button at the bottom of the application window to display the Objects sheet.
|
2.
|
|
Double-click a dialog box.
|
3.
|
|
Click Insert Color box.
|
4.
|
|
In the dialog box, drag diagonally to create the control.
|
To add a combo box to a dialog box |
1.
|
|
Click the Quick tab button at the bottom of the application window to display the Objects sheet.
|
2.
|
|
Double-click a dialog box.
|
3.
|
|
Click Insert Combo box.
|
4.
|
|
In the dialog box, drag diagonally to create the control.
|
If you want to specify a system list for the combo box, right-click the combo box, click Properties List, and click a list.
|
To add a label control to a dialog box |
1.
|
|
Click the Quick tab button at the bottom of the application window to display the Objects sheet.
|
2.
|
|
Double-click a dialog box.
|
3.
|
|
Click Insert Label text.
|
4.
|
|
In the dialog box, drag diagonally to create the control.
|
5.
|
|
Right-click the control, and click Properties Label text.
|
6.
|
|
In the Enter text box, type the label to display.
|
To add an edit box to a dialog box |
1.
|
|
Click the Quick tab button at the bottom of the application window to display the Objects sheet.
|
2.
|
|
Double-click a dialo
g box. |
3.
|
|
Click Insert Edit box.
|
4.
|
|
In the dialog box, drag diagonally to create the control.
|
•
|
|
Special characters (such as \n, \t, or \\) can only be allowed in an edit box if the Convert text option is set to Yes.
|
•
|
|
If you want to remove the surrounding box, right-click the edit box, and click Properties Show frame No.
|
To add a file control to a dialog box |
1.
|
|
Click the Quick tab button at the bottom of the application window to display the Objects sheet.
|
2.
|
|
Double-click a dialog box.
|
3.
|
|
Click Insert File control.
|
4.
|
|
In the dialog box, drag diagonally to create the control.
|
To add a group box to a dialog box |
1.
|
|
Click the Quick tab button at the bottom of the application window to display the Objects sheet.
|
2.
|
|
Double-click a dialog box.
|
3.
|
|
Click Insert Group box.
|
4.
|
|
In the dialog box, drag diagonally to create the control.
|
5.
|
|
Click Insert, and click a control to add to the group box.
|
6.
|
|
In the group box, drag diagonally to create the control.
|
•
|
|
When you add a group box, the Process value of a group box is set to yes. The Process value of radio buttons in the group box are set to no.
|
•
|
|
You can also add options to a group box by copying a block from the clipboard to the group box. Each row of the block bec
omes a radio button. |
To add a scroll bar to a dialog box |
1.
|
|
Click the Quick tab button at the bottom of the application window to display the Objects sheet.
|
2.
|
|
Double-click a dialog box.
|
3.
|
|
Click Insert Scroll bar.
|
4.
|
|
In the dialog box, drag diagonally to create the control.
|
•
|
|
The value of a scroll bar is an integer from a fixed range of integers.
|
To add a list box to a dialog box |
1.
|
|
Click the Quick tab button at the bottom of the application window to display the Objects sheet.
|
2.
|
|
Double-click a dialog box.
|
3.
|
|
Click Insert List box.
|
4.
|
|
In the dialog box, drag diagonally to create the control.
|
If you want to specify a system list for the list box, right-click the list box, click Properties List, and click a list.
|
•
|
|
By default, list box entries are sorted alphanumerically in ascending order.
|
To add a radio button to a dialog box |
1.
|
|
Click the Quick tab button at the bottom of the application window to display the Objects sheet.
|
2.
|
|
Double-click a dialog box.
|
3.
|
|
Click Insert Radio button.
|
4.
|
|
In the dialog box, drag diagonally to create the control.
|
If you want to display the label to the left of the radio button, right-click the radio button, and click Properties Draw to right No.
|
•
|
|
You can also add radio buttons to a dialog box by copying a block of data from the clipboard so that each row of the block becomes a radio button.
|
To add a rectangle control to a dialog box |
1.
|
|
Click the Quick tab button at the bottom of the application window to display the Objects sheet.
|
2.
|
|
Double-click a dialog box.
|
3.
|
|
Click Insert Rectangle.
|
4.
|
|
In the dialog box, drag diagonally to create the control.
|
5.
|
|
Click Insert, and click a control to add to the rectangle control.
|
6.
|
|
In the rectangle control, drag diagonally to create the control.
|
To add a spin control to a dialog box |
1.
|
|
Click the Quick tab button at the bottom of the application window to display the Objects sheet.
|
2.
|
|
Double-click a dialog box.
|
3.
|
|
Click Insert Spin control.
|
4.
|
|
In the dialog box, drag diagonally to create the control.
|
•
|
|
The value of a spin control is always an integer.
|
To add a tab control to a dialog box |
1.
|
|
Click the Quick tab button at the bottom of the application window to display the Objects sheet.
|
2.
|
|
Double-click a dialog box.
|
3.
|
|
Click Insert Tab.
|
4.
|
|
In the dialog box, drag diagonally to create the control.
|
If you want to add another control to the tab control, click Insert, and click a control.
|
•
|
|
You can rename a tab by double-clicking on its name and typing a new one.
|
To add a timer control to a dialog box |
1.
|
|
Click the Quick tab button at the bottom of the application window to display the Objects sheet.
|
2.
|
|
Double-click a dialog box.
|
3.
|
|
Click Insert Timer.
|
4.
|
|
In the dialog box, drag diagonally to create the control.
|
•
|
|
The timer control can be turned into a clock by right-clicking the control, and clicking Properties Show time Yes.
|