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

TCustomCheckBox.State

The check, unchecked, or grayed state for the control.

Declaration

Source position: stdctrls.pp line 1360

public property TCustomCheckBox.State : TCheckBoxState
  read GetState
  write SetState
  default cbUnchecked;

Description

Indicates whether the check box is checked (selected), unchecked (deselected) or grayed (disabled). See TCheckBoxState for the possible values in State.

See also

TCheckBoxState

  

Represents the states for a check box.

Example

{ This example uses a check box on a form. When the application runs, 
  the check box is initially checked. When the user clicks it,
  the check box is unchecked. Clicking it again grays the check box. }
procedure TForm1.FormCreate(Sender: TObject);
begin
  Checkbox1.AllowGrayed := True;
  Checkbox1.State := cbChecked;
end;
The latest version of this document can be found at lazarus-ccr.sourceforge.net.