Home » C# Basics » 08 - Windows Programming - 1
8

CheckBox Control

Defines the properties of the checkbox control in a windows application

CheckBox control is used to select option from a given set of options. We can select more than one option with the CheckBox controls. The common properties of the control are:

(Name)

The name used to access the control in code.

Checked

Indicates if the control is in checked state.

CheckState

Determines if the control is checked, unchecked or intermediate (unsure) state.

Text

The text to be displayed along with the checkbox.

The event useful for this control are -

CheckedChanged

Occurs when the Checked property is changed.

The CheckBox controls are usually placed inside another control - the GroupBox control. This control logically groups related controls like the CheckBox and RadioButton controls. We need to drag the GroupBox control from the `Containers' section of the Toolbox and drop it on the form. Then we can drag and drop the CheckBox and RadioButton controls inside the GroupBox control.