RadioButton_t

Imported from previous forum

[ original email was from Dev Ashish - dashish@lab49.com ]
What’s the expected use of RadioButton_t and how is it different from CheckBox_t?

Thanks

What’s the expected use of RadioButton_t and how is it different from
CheckBox_t?

Thanks

Dev,
In our definition, control types RadioButton_t and CheckBox_t have the same functionality. An OMS, though, should render them with either a RadioButton control or a CheckBox control. I.e. they should look different on the screen but have the exact same behavior.
Please note that the RadioButtonGroup_t control is not derived from nor contains references to RadioButton_t controls. They are independent of each other. I suppose we could have come up with a deeper hierarchy of control type derivations, but we decided to go with a flat hierarchy where all the controls are derived from the base control Control_t.
-Greg

[ original email was from Dev Ashish - dashish@lab49.com ]
Greg,

Dev, In our definition, control types RadioButton_t and CheckBox_t
have the same functionality.

Ok, thanks. I expected that but wanted to make sure.

Please note, however, that the RadioButton behavior in Windows works differently than a CheckBox. While a CheckBox can be toggled with a single-click, clicking a checked RadioButton will essentially do nothing. Additional code needs to be written to bring toggle functionality to the CheckBox.

– Dev

A Radio Button would belong to a Button Group which would usually have more than 2 Radio Buttons (Having a Single Radio Button in a Button Group does not provide any useful functionality. In many cases having two Radio Buttons in a Button Group can be replaced with a Single CheckBox thus saving space on the screen). Only one Radio Button in a Button Group can be selected at any given time. Selecting a different Radio Button in a Button Group would automatically unselect the other Radio Buttons within the Button Group. In Java, there is no additional code required to implement the toggle functionality in a CheckBox, for a Radio Buttons they need to be added to the appropriate Button Group.

Greg,

Dev, In our definition, control types RadioButton_t and CheckBox_t
have the same functionality.

Ok, thanks. I expected that but wanted to make sure.

Please note, however, that the RadioButton behavior in Windows works
differently than a CheckBox. While a CheckBox can be toggled with a single-
click, clicking a checked RadioButton will essentially do nothing.
Additional code needs to be written to bring toggle functionality to
the CheckBox.

– Dev