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

# TCustomCheckBox.RetrieveState

Gets the checked state for the control from the widgetset class.

## Declaration

Source position: stdctrls.pp line 1342

`protected function TCustomCheckBox.RetrieveState: TCheckBoxState;`

## Function result

TCheckBoxState value returned from the widgetset class.

## Description

RetrieveState is a TCheckBoxState function used to get the checked, unchecked, or grayed state for the control from the widgetset class. Access to the widgetset class requires a valid handle in the control. If the handle has not been assigned, the return value is set to the existing value in the State member.

RetrieveState calls the RetrieveState method in the widgetset class to get the return value for the method.

RetrieveState is used to get the value for the State property. It is called from DoChange when the LM_CHANGED control message is handled for the control. It is also called when setting a new value for the Checked property.