ID 757211
Date 7/23/2021
Public

## Using Dialog Controls

The dialog controls provided in the Resource Editor are versatile and flexible; when used together, they can provide a sophisticated user-friendly interface for your application. This section discusses the available dialog controls.

Any control can be disabled by your application at any time, so that it no longer changes or responds to the user. This is done by setting the control index DLG_ENABLE to .FALSE. using DLGSET or DLGSETLOG. For example:

  LOGICAL retlog
retlog = DLGSET (dlg, IDC_CHECKBOX1, .FALSE., DLG_ENABLE)

This example disables the control named IDC_CHECKBOX1.

When you create your dialog box in the Resource Editor, the dialog controls are given a tab order. When the user hits the Tab key, the dialog box focus shifts to the next control in the tab order. By default, the tab order of the controls follows the order in which they were created. This may not be the order you want.

You can change the order by opening the Format menu and choosing Tab Order (or by pressing the key combination Ctrl+D) in the Resource Editor. A tab number will appear next to each control. Click the mouse on the control you want to be first, then on the control you want to be second in the tab order and so on. Tab order also determines which control gets the focus if the user presses the Group box hotkey. (See Using Group Boxes.)

For information on using ActiveX controls in a dialog, see Using ActiveX* Controls Overview.

The following sections describe the function and use of the dialog controls.