Vcl.Controls.TControl.ControlState
Delphi
property ControlState: TControlState read FControlState write FControlState;
C++
__property TControlState ControlState = {read=FControlState, write=FControlState, nodefault};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | Vcl.Controls.pas Vcl.Controls.hpp |
Vcl.Controls | TControl |
Description
Specifies the current state of a control at run time.
Read ControlState to find out various conditions that affect the control such as whether it has been clicked or needs alignment. ControlState reflects transient conditions of an instance of the control, as opposed to attributes of the control class as a whole. ControlState consists of a set of flags drawn from the following values:
Flag | Meaning |
---|---|
csLButtonDown |
The left mouse button was clicked and not yet released. This is set for all mouse-down events. |
csClicked |
The same as csLButtonDown, but only set if ControlStyle contains csClickEvents, meaning that mouse-down events are interpreted as clicks. |
csPalette |
The system palette has changed and the control or one of its descendants has not finished adjusting by realizing its palette. |
csReadingState |
The control is reading its state from a stream. |
csAlignmentNeeded |
The control needs to realign itself when alignment is re-enabled. |
csFocusing |
The application is processing messages intended to give the control focus. This does not guarantee the control will receive focus, but prevents recursive calls. |
csCreating |
The control and/or its owner and subcontrols are being created. This flag clears when all have finished creating. |
csPaintCopy |
The control is being replicated, meaning a copy of the control is being painted. The ControlStyle flag csReplicatable must be set for this state to occur. |
csCustomPaint |
The control is processing custom paint messages. |
csDestroyingHandle |
The control's window is being destroyed. |
csDocking |
The control is being docked. |
The flags in ControlState are specific to controls, and augment the state flags in the ComponentState property.
ControlState is primarily used by component writers in the implementation of components derived from TControl.