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

# TControlStateType

State flags of a Control.

## Declaration

Source position: controls.pp line 338

`type TControlStateType = (`
`csLButtonDown,` |  | Indicates the Left mouse button was down for the control.
`csClicked,` |  | Indicates the control was clicked; occurs after button down/up processing.
`csPalette,` |  | Palettes are not currently implemented in LCL.
`csReadingState,` |  | Indicates the ReadState method has been called for the control.
`csFocusing,` |  | Indicates the focus for the control has been changed.
`csCreating,` |  | Introduced for Delphi compatibility; not used in LCL.
`csPaintCopy,` |  | Indicates a device context was copied in PaintControls.
`csCustomPaint,` |  | Indicates a custom paint method is used to draw the control; determines the handler called to paint the control.
`csDestroyingHandle,` |  | Used to suppress message processing when the control is freed.
`csDocking,` |  | Indicates the Dock method has been called for a control.
`csVisibleSetInLoading` |  | Indicates the control is being loaded using the LCL component streaming mechanism.
`);`

## Description

TControlStateType is an enumeration type which contains values that represent state information for control class instances, including:

- csLButtonDown
- csClicked
- csPalette
- csReadingState
- csAlignmentNeeded
- csFocusing
- csCreating
- csPaintCopy
- csCustomPaint
- csDestroyingHandle
- csDocking
- csVisibleSetInLoading

Values from the TControlStateType enumeration are stored in the TControlState type, and used to implement the ControlState property in TControl.

## See also

TControlState |  | Set of control states used in a control.
TControl.ControlState |  | Contains state flags which indicate whether the control has been clicked, data is being read, or the control is being re-drawn, etc.