Specifying accessibility of controls
Controls have two boolean properties that affect accessibility
of the control:
- Visible
- Enabled
Using the Visible property
If the Visible property of a control is selected, the control
displays in the window. If you want a control to be initially invisible,
be sure the Visible property is not selected in the General tab
page in the control’s Properties view.
Hidden controls do not display by default in the Window painter’s
Layout view.
To display hidden controls in the Layout view:
-
Select Design>Show Invisibles
from the menu bar.
To display a control during execution, assign the value true to
the Visible property:
1 |
<i>controlname</i>.Visible = TRUE |
Using the Enabled property
If the Enabled property is selected, the control is active.
For example, an enabled CommandButton can be clicked, a disabled
CommandButton cannot.
If you want a control to display but be inactive, be sure
the Enabled property is not selected in the General tab page in
the control’s Properties view. For example, a CommandButton
might be active only after the user has selected an option. In this
case, display the CommandButton initially disabled so that it appears
grayed out. Then when the user selects the option, enable the CommandButton
in a script:
1 |
<i>CommandButtonName</i>.Enabled = TRUE |