Radio Button and Checkbox
Submitted by joken on Friday, October 25, 2013 - 10:40.
Radio button or option button, is a circular control that comes in a group with other controls of the same type. Usually a radio button like an empty circle or a donut. If it is clicked, it will be filled with a big dot. And in every group of radio button only one can be selected by the user. Example in a membership form, there is always a radio button for Gender for Male and Female.
Example:
Visual Basic Code:
CheckBox is quite opposite and similar to Radio Button, because using CheckBox you can do a multiple selection, and unlike the Radio button you can only select one, and it is similar in some way. Example their properties, they have the same Checked property that when selected, will toggle the true or false value.
Example:
Visual Basic Code:
- 'check if the selected radiobutton is male
- If RadioButton1.Checked = True Then
- 'display that the selected radio button is Male
- 'check if the selected radiobutton is Female
- ElseIf RadioButton2.Checked = True Then
- 'display that the selected radio button is Female
- End If
- 'check if cappucino is selected
- If CheckBox1.Checked = True Then
- End If
- 'check if Latte is selected
- If CheckBox2.Checked = True Then
- End If
- 'check if Hot Coffee is selected
- If CheckBox3.Checked = True Then
- End If
- 'check if Ice Cold Coffee is selected
- If CheckBox4.Checked = True Then
- End If
Comments
Add new comment
- Add new comment
- 3942 views