Unit 'Controls' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#lcl]

TControl.Enabled

Determines whether the control responds to mouse or keyboard input.

Declaration

Source position: controls.pp line 1738

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 OnEnabledChanging handlers.

TControl.EnabledChanged

  

Notifies all OnEnabledChanged handlers.

TControl.DoCallNotifyHandler

  

Invokes all notification handlers of the specified type.

TControl.IsEnabled

  

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



CT Web help

CodeTyphon Studio