|
Introduction to PowerBuilder
RadioButton
A RadioButton is
similar to a Checkbox, with one difference. When you place more
than one Checkbox on the window, you can check any/all/one
Checkboxes on/off. Every Checkbox is independent. Similarly, if
you have more than one RadioButton placed on a window, you can
always turn on only one RadioButton, no matter how many
Radiobuttons are there on the window. This behavior makes sense
in the example given below, because you can't be single and
married at the same time!
If you select one
RadioButton when another RadioButton is already selected, the
first RadioButton will be deselected before the second
RadioButton becomes activate. Other properties for the
RadioButton are similar to those of Checkboxes.
Sometimes, you
might have multiple logical groups. For example, from the above
picture, Radiobuttons related to "Sex" is one logical
group, while other Radiobutton belong to another logical group
"Martial Status". That means user should be able to
choose one option from each question, similar to the picture. By
default, it is not possible, since as soon as the user selects
another Radiobutton, previously selected RadioButton becomes
de-selected.
For practice,
paint the window as shown in the above picture and try to select
options from each logical group and see, whether you are able to
or not.
The solution for
this problem is using a Groupbox. We will explain this in
"Groupbox"
In version 6.0, this control
supports 'Right to Left' property. |
|