Show: Delphi C++
Display Preferences

Vcl.Controls.TControl.SetEnabled

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure SetEnabled(Value: Boolean); virtual;

C++

virtual void __fastcall SetEnabled(bool Value);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TControl

Description

Sets the value of the Enabled property.

SetEnabled is the protected write implementation of the Enabled property. After changing the internal representation of the Enabled property, SetEnabled sends a Windows message back to the control so that it can respond to the change. When TControl receives this message, it invalidates the control so that its appearance reflects the change (for example, so that it appears grayed). Some descendants respond to this message in other ways (for example, windowed controls ensure that a disabled control does not have focus).

Override GetEnabled and SetEnabled to change the implementation of the Enabled property. For example, a descendant of TControl might change the way the Enabled property interacts with an associated action. When overriding SetEnabled, be sure to call the inherited method.

See Also

Personal tools
In Other Languages
Previous Versions
Assistance