CheckBox Control in VB.NET
Check box control is used to represents list of options to the user from which user can select none or any number of options.
Check Box control allow user to select or deselect particular option.
Each time user clicks on the Check Box its status get changed. When check box is selected it has a checked status and when it is not selected it has Unchecked status.
Properties of CheckBox Control in VB.NET
| Property | Purpose | ||||||
AutoCheck |
It is used to specify weather CheckBox can automatically change its state or not when it is clicked. It has Boolean value. Default value is true. |
||||||
CheckAlign |
It is used to get or set alignment of the |
||||||
Checked |
It is used to get or set Boolean value, which indicates weather CheckBox Control is currently selected or not. It has Boolean value. True means selected. Default value is false. |
||||||
CheckState |
It is used to get or set current state of the CheckBox Control. It can have one of the following three values: Checked, Unchecked, Indeterminate |
||||||
ThreeState |
It is used to specify weather CheckBox Control allows three check states instead of two check states or not. It has a Boolean value. Default value is false. |
||||||
Text |
It is used to get or set text associated with CheckBox Control. |
||||||
TextAlign |
It is used to get or set alignment of the text that is associated with CheckBox Control. |
||||||
Enable |
It is used to specify weather CheckBox Control is enabled or not. It has Boolean value. Default value is true. |
||||||
Visible |
It is used to specify weather CheckBox Control is visible or not at run time. It has Boolean value. Default value is true. |
||||||
BackColor |
It is used to get or set background color of the CheckBox. |
||||||
ForeColor |
It is used to get or set color of the text associated with CheckBox. |
||||||
Font |
It is used to get or set font Style, Font Size, Font Face of the text associated with CheckBox. |
||||||
TabStop |
It is used to specify weather user can use TAB key to set focus on CheckBox Control or not. It has Boolean value. Default value is true. |
||||||
Methods of CheckBox Control in VB.NET
| Method | Purpose |
Show |
It is used to show CheckBox Control at run time. |
Hide |
It is used to Hide CheckBox Control at run time. |
Focus |
It is used to set cursor or focus on CheckBox Control. |
Events of CheckBox Control in VB.NET
| Event | Purpose |
CheckedChanged |
It is the default event of CheckBox Control. It fires each time the value of checked property is changed. |
CheckStateChanged |
It fires each time the value of CheckState property is changed. |