TW3CheckBox



TW3CheckBox


Represents class for Check-box control. W3CheckBox component react on user clicks (taps) and change state from checked to unchecked and vice-versa.


W3CheckBox-unchecked.png

Unit: SmartCL.Controls.CheckBox.pas

Hierarchy
TObject
TW3TagObj
TW3Component
TW3MovableControl
TW3CustomControl
TW3CheckBox


W3CheckBox is a composite component consisted from TW3Label and TW3CheckMark components.

Properties
Property-icon.png Caption
Property-icon.png Checked
Property-icon.png Label

Properties

Property-icon.png Caption

Specifies text displayed beside Check-box.

property Caption: String read getCaption write setCaption;

Remarks:

Changing this property also change Caption property of TW3Label child control.

Property-icon.png Checked

Determine whether Check-box is in checked state (checkmark is shown):

W3CheckBox-checked.png

property Checked: Boolean read getChecked write setChecked;
Note-icon.png Best place to determine if user has changed Checked property via mouse/touch (and keyboard) in OnClick event.

Example:

procedure TForm1.W3CheckBox1Click(Sender: TObject);
begin  
if W3CheckBox1.Checked then  
 begin    
   ShowMessage('Checked!');  
 end;
end;

Property-icon.png Label

Indicate

property Label: TW3Label read FLabel;