Specifies whether an object can respond to user-generated events. Available at design time and run time.
Syntax
Object.Enabled[ = lExpr]
Settings
lExpr
The settings for the Enabled property are:
Setting | Description |
True (.T.) | (Default) An object responds to events. |
False (.F.) | An object does not respond to events. |
Remarks
The Enabled property allows objects to be enabled or disabled at run time. For example, you can disable objects that do not apply to the current state of the application. You can also disable a control to restrict its use — for example, an edit box can be disabled to display read-only information. If a control is disabled, it cannot be selected.
When a container object has its enabled property set to false (.F.), all of its contained controls are disabled, too. If the user clicks on any of the controls contained in a disabled Form, for example, no events are triggered.
Disabling a Timer control by setting Enabled to false (.F.) cancels the countdown specified by the Timer control's Interval property.