[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Controls' (#lcl)

TControl.Enabled

Determines whether the control responds to mouse or keyboard input.

Declaration

Source position: controls.pp line 1813

public property TControl.Enabled : Boolean
  read GetEnabled
  write SetEnabled
  stored IsEnabledStored
  default True;

Description

Enabled is a Boolean property which indicates whether the control can respond to focus, input, or mouse events. The default value for the property is True. When Enabled is set to False, the control is displayed with a "grayed-out" appearance. It is unable to receive input focus, handle keyboard navigation or input, respond to mouse click events, or execute its Action.

Changing the value for the property causes additional actions to be performed. EnabledChanging is called to signal any chtOnEnabledChanging control handlers assigned for the control. The property value is updated, and a CM_ENABLEDCHANGED control message is dispatched for the control. The EnabledChanged method is called to signal any chtOnEnabledChanged control handlers for the control.

Use IsEnabled to check the effective enabled state for both the control and its Parent control (when assigned).

See also

TControl.EnabledChanging

  

Notifies all chtOnEnabledChanging handlers for the control.

TControl.EnabledChanged

  

Notifies all chtOnEnabledChanged handlers for the control.

TControl.DoCallNotifyHandler

  

Signals handler routines for the specified control handler type.

TControl.IsEnabled

  

Returns True if both the control and all of its Parent controls are Enabled.


Version 3.2 Generated 2024-02-25 Home