次の方法で共有


Enabled Property

Specifies whether an object can respond to user-generated events. Available at design time and run time.

Object.Enabled[ = lExpr]

Property Values

  • 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.

See Also

Click Event | DblClick Event | DragDrop Event | DragOver Event | DropDown Event | KeyPress Event | MouseDown Event | MouseMove Event | MouseUp Event | RightClick Event | Scrolled Event | Undock Event

Applies To: CheckBox | Column | ComboBox | CommandButton | CommandGroup | Container Object | Control Object | EditBox | Form | Grid | Image | Label | Line | ListBox | OLE Bound Control | OLE Container Control | OptionButton | OptionGroup | Page | PageFrame | _SCREEN | Shape | Spinner | TextBox | Timer | ToolBar