A radio-box% control allows the user to select one of number of mutually exclusive items. The items are displayed as a vertical column or horizontal row of labelled radio buttons. Unlike a list-control<%>, the set of items in a radio-box% cannot be changed dynamically.
Whenever the user changes the selected radio button, the radio box's callback procedure is invoked. A callback procedure is provided as an initialization argument when each radio box is created.
Creates a radio button set with string or bitmap labels. The choices list specifies the radio button labels; the list of choices must be homogenous, either all strings or all bitmaps.
If an ampersand (``&'') occurs in label, it is specially parsed; under Windows and X, the character following an ampersand is underlined in the displayed control to indicate a keyboard mnemonic. (Under MacOS, mnemonic underlines are not shown.) The underlined mnemonic character must be a letter or a digit. The user can move the keyboard focus to the radio box by typing the mnemonic when the control's top-level-window contains the keyboard focus. The user must also hold down the Meta or Alt key if the keyboard focus is currently in a control that handles normal alphanumeric input. The ampersand itself is removed from label before it is displayed for the control; a double-ampersand in label is converted to a single ampersand (with no mnemonic underlining). Mnemonic keyboard events are handled by on-traverse-char (but not under MacOS).
Each string in choices can also contain an ampersand, which creates a mnemonic for clicking the corresponding radio button. As for label, a double ampersand is converted to a single ampersand.
If choices is a list of bitmaps, then the bitmaps must be valid (see ok? in bitmap%) and not installed in a bitmap-dc% object; otherwise, an exn:application:mismatch exception is raised.
If label is a string, it is used as the label for the radio box. Otherwise, the radio box does not display its label.
The callback procedure is called (with the event type 'radio-box) when the user changes the radio button selection.
The style argument must include either 'vertical for a collection of radio buttons vertically arranged, or 'horizontal for a horizontal arrangement.