RadioButton
controls are used to get the mutually exclusive options from the user. It has similar functionality with CheckBox
control. CheckBox
control is to get combination of options from the user, whereas this control allowed to select mutually exclusive options.
Properties
When set AutoCheck
property to True
, the state of the RadiButton
control automatically changed when we click on it.
We can retrieve or set the state of the RadioButton
control using it’s Checked
property. When the radio button is selected, the value of the Checked
property will be set to True
; otherwise, it sets with the value False
.
Another important interesting behavior of radio button controls is, they automatically unchecked when any other radio button control in the group is selected to ensure the user can select only one option at a time from the group of radio button controls. When we placed these controls on the Form
, the controls share the same group; to group them separately, either we need to place the controls in a Panel
or within a GroupBox
.
Events
The most commonly used event is CheckedChanged
event. It will raise whenever a Checked
property of the control is changed.
(Raju)