
IF boolEnable == true
{
rbtMale.Enable()
rbtFemale.Enable()
}
ELSE
{
rbtMale.Disable()
rbtFemale.Disable()
}
Note:
boolEnable – a Form Variable, used as a flag in this instance to check whether to enable or disable the radio button.
rbtMale – a Form control, radio button.
RbtFemale – a Form control, radio button.
A disabled radio button will appear shaded out on the form.
IF boolShow == false
{
rbtMale.Hide()
rbtFemale.Hide()
}
ELSE
{
rbtMale.Show()
rbtFemale.Show()
}
Note:
boolShow – Form variable, used as a flag in this instance to check whether to display or hide the radio button.
rbtMale – a Form control, radio button.
rbtFemale – a Form control, radio button.
A radio button will not be visible on the form when it is hidden.
rbtFemale.SetFocus()
Note:
rbtFemale – a Form control, radio button.
This expression will set the form focus on the radio button. Setting the focus on a radio button will select the radio button.