RAD Studio VCL Reference
|
Determines whether check box can be in a "grayed" state.
property AllowGrayed: Boolean;
__property Boolean AllowGrayed;
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.
C++ Examples:
/* 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. */ void __fastcall TForm1::FormCreate(TObject *Sender) { CheckBox1->AllowGrayed = true; CheckBox1->State = cbChecked; }
Delphi Examples:
{ 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;
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|