RadioButton

RadioButtons are round buttons that represent mutually exclusive options. They always exist in groups. Exactly one RadioButton is selected in each group.

When a RadioButton is selected, it has a dark center; when it is not selected, the center is blank.

In the following example, the text can be either plain, bold, or italic (plain is selected):

Shown is a rectangle with three buttons outlined by black circles and aligned top to bottom. The text to the left of the buttons reads Plain, Bold, and Italic. The first button has a black center, indicating that Plain is selected. The others have blank centers.

When the user clicks a RadioButton, it becomes selected and the previously selected RadioButton in the group becomes deselected.

Use RadioButtons to represent the state of an option. Do not use them to invoke actions.

When a window opens, one RadioButton in a group must be selected. You specify which is the initially selected RadioButton by selecting the Checked property in the General property page in the RadioButton's Properties view.

Grouping RadioButtons

By default, all RadioButtons in a window are in one group, no matter what their location in the window. Only one RadioButton can be selected at a time.

You use a GroupBox control to group related RadioButtons. All RadioButtons inside a GroupBox are considered to be in one group. One button can be selected in each group.

At left is a rectangle with the label Style in its top left corner. It contains three vertically aligned buttons labeled Plain, Bold, and Italic. The first button has a black center, indicating that Plain is selected. The others have blank centers. To the right is a rectangle with the label Size in its top left corner. It contains three buttons aligned vertically and labeled 14, 18, and 24. The button labeled 18 has a black center, indicating that it is currently selected, and the others have blank centers.

The Automatic property

When a window contains several RadioButtons that are outside of a GroupBox, the window acts as a GroupBox. Only one RadioButton can be active at a time unless the check box for the Automatic property on the RadioButton’s General property page is cleared. When the Automatic property is not set, you must use scripts to control when a button is selected. Multiple RadioButtons can be selected outside of a group.

The Automatic property does not change how RadioButtons are processed inside a GroupBox.