Selecting Options With ARadioButton Controls

Radio buttons, or option buttons, are a way in which the user can make selections or choices. ATEasy has the ARadioButton control, which is its implementation of the radio button. Unlike checkboxes, where you can select any or all of them, you can select one and only one radio button within a group of radio buttons. When you select a radio button, if another button in the group was previously selected, that button will turn "off" and the newly selected one will turn "on".

You can select a radio button by clicking it with the mouse, by pressing a shortcut key for that button, or by tabbing to it and hitting the spacebar.

Grouping Radio Buttons via AGroupBox Control

Unless you specify otherwise, all radio buttons on a form are in one group. If you have more than one group, this is probably not the desired behavior. So, you need to group your radio button. One way to group them is to simply draw the AGroupBox control first, and then place your radio buttons within the container. In the following example two group boxes created Measure and REading Rate. Each have 3 radio buttons.

Two groups of radiobuttons.

The AGroupBox control also makes for an effective visual separation between groups of buttons. ATEasy automatically sets the Container property of each radio button to its respective group box name on its properties page allowing the controls to be drawn above the group box, in addition the GroupName property must be set to a unique group name ("Measure" and "Rate") that can be typed for each of the radio boxes controls forcing only one radio button for each group to be selected.

Radio Button Properties

When the form is activated, the buttons will exhibit the proper behavior within their respective groups.