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

TDBCheckBox.GetFieldCheckState

GetFieldCheckState - returns the checkbox state for the current field.

Declaration

Source position: dbctrls.pp line 667

protected function TDBCheckBox.GetFieldCheckState: TCheckBoxState; virtual;

Function result

Current TCheckBoxState for the control.

Description

GetFieldCheckState is a TCheckBoxState function used to get the current state for the checkbox. GetFieldCheckState uses the internal TFieldDataLink instance in the class to access the Field in the linked dataset represented by DataField.

The field value is examined to get the return value for the method. The return value can be one of the following:

cbChecked
Used when the Boolean value in the Field is True.
cbUnchecked
Used when the Boolean value in the Field is False, or the String value matched ValueChecked. Also used when the Field has not been assigned (contains Nil).
cbGrayed
Used when the value in Field is NULL, and when none of the previous conditions are True.

The return value is assigned to the State property when the DoOnChange and DataChange methods are executed.