Controls have two boolean properties that affect accessibility of the control:
-
Visible
-
Enabled
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 a control at runtime, assign the value "true" to the Visible property:
controlname.Visible = TRUE
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:
CommandButtonName.Enabled = TRUE