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

TCustomCheckBox.AllowGrayed

Determines whether the check box can be in a "grayed" state.

Declaration

Source position: stdctrls.pp line 1212

public property TCustomCheckBox.AllowGrayed: Boolean
  read FAllowGrayed
  write FAllowGrayed
  default false;

Description

If AllowGrayed is set to True, the check box has three possible states: checked, unchecked and grayed. If AllowGrayed is set to False, the check box has only two possible states: checked and unchecked.

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.