CheckBox Control

CheckBox Control

Check box is used to select one or more options from the multiple options. From the group of check box, any number of check boxes may be selected, while from the group of radio button, only one radio button is selected at a time.

Property :  

1. Appearance : If Appearance value is set to Normal, the CheckBox appears as a typical CheckBox. If the value is set to Button, the CheckBox appears like a toggle button, which can be toggled to an up or down state.

2. FlatStyle : Gets or sets the flat style appearance of the control when a user moves the mouse pointer over the control and click.

  • Flat : The control appears flat. 
  • Popup : A control appears flat until the mouse pointer moves over it, at which point it appears three-dimensional. 
  • Standard :   The control appears three-dimensional. (By Default)
  • System: The appearance of the control is determined by the user’s operating system. 

3. ThreeState : If this property is set to False, then the CheckBox has two states namely Checked, Unchecked. By default it is False.

If this property is set to True, then the CheckBox has three states namely Checked, Unchecked & Intermediate. Intermediate state is sort of middle state between checked & unchecked.

4. CheckState : Gets or sets the state of the CheckBox.

CheckState Description
image 33   Checked The CheckBox displays a check mark. 
image 34   Unchecked The CheckBox is empty. 
image 35   Indeterminate Intermediate state is sort of middle state between checked & unchecked.

5. Checked : This property is used to check whether the Checkbox is checked or not.. If this property is true, then the CheckBox is in the checked state. If it is false, then the CheckBox is in unchecked state. 

6. Text : It is the text that is displayed within the control. The Text property can contain an access key, which allows a user to “click” the control by pressing the ALT key with the access key.

Event :

CheckedChanged : It occurs when the value of the Checked property changes. It is the default event of CheckBox control.

Leave a Comment