RadioButton control
A RadioButton control is part of a group that represents mutually exclusive options. It displays a selection box plus a text label, bitmap, or icon image. To display a bitmap or icon image in a RadioButton control, you must add the desired bitmap or icon on the Bitmaps or Icons project page, then select the control's Caption type and set the control's Caption attribute to the name of the desired bitmap or icon image.
Each RadioButton control is linked to either a symbolic variable or to a component.
- Symbolic variable: When a RadioButton control is selected, the linked variable's value is set to the value specified by the Symbol value attribute (see below). The variable itself can be used in conditions elsewhere; this allows you to use radio buttons to control the installer's actions or component selection. When the RadioButton control is deselected, no changes are made to the linked symbol because the symbol's value is assumed to be updated by another RadioButton in the same group (see below).
- Component: When a RadioButton control is selected, the linked component is set to its Selected state; when deselected, the linked component is set to Not selected.
When running on Windows XP and later with visual themes enabled, RadioButton controls appear not themed if:
- The control has a transparent background (Transparent attribute, see below), or
- The control has a non-default text color (Color attribute, see below).
How to create a radio button group
To create a group of radio buttons, do the following:
- Create a RadioButton control for each option. Place the controls in the (tab) order that you want to present them, both visually and in the Dialogs tree on the Dialogs page.
- Check the Group attribute of the first RadioButton control in the group; clear it for all other radio buttons in the same group. Also check the Group attribute of the first control after the last radio button in the group.
- For symbolic variables:
- Set the Symbol name of all RadioButton controls in the group to same variable. Also make sure that all radio buttons have their Indirect attribute in the same state: either all checked or all unchecked.
- Assign the appropriate Symbol value value to each of the RadioButton controls in the group.
- For components: Specify a different component for each RadioButton control in the group; this makes the component selection mutually exclusive. On the Components page, make sure that at most one of these components starts out in its Selected state.
Tip: If space is at a premium, you can replace a group of RadioButton controls that are linked to a symbolic variable by a single ComboBox control with its Combo style set to Drop list and List Values corresponding to each of the radio buttons. A group of RadioButtons linked to different components is best replaced with an OptionTree control.
Tip: To change the tab and Z-order of a control in a dialog box (i.e., the order in which they are drawn and how they appear "on top" of each other), select the control in the dialog/control tree in the left pane on the Dialogs project page, then use Ctrl+Up and Ctrl+Down to move the control up or down in the order. These keystrokes are shortcuts for the Move Up and Move Down commands on the control's context menu.
Attributes
The following attributes and options are available.
Attribute | Description | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Control name | Enter the internal name for the control. This name is for use in InstallMate only; it is not used in the installer. All control names must be unique within their parent dialog box. | ||||||||||||||||||||||
Control ID | Select a control ID from the drop-down list or type a numerical ID to use for this control. All controls within a dialog must have different control IDs. For most controls, you should select Automatic; for PushButton controls, one of the standard IDxxx values is generally recommended. See Dialog control IDs for an explanation of the available control IDs and their usage. |
||||||||||||||||||||||
Caption type | Select the desired caption type from the drop-down list:
|
||||||||||||||||||||||
Caption | Depending on the Caption type selection, enter one of the following:
|
||||||||||||||||||||||
Localized | Check this box to localize the Caption field and use different captions for different languages. | ||||||||||||||||||||||
Icon size | Select the desired icon size for the control. This option only has effect if the Caption type is set to Icon. Note: If the selected image size is not present in the icon file, then the system scales one of the other icon images to the desired size. The resulting image may be less than satisfactory; in that case, you should edit the original icon file and add an image of the required size. |
||||||||||||||||||||||
Multiline | Check this box to allow the control's caption to wrap around to the next line if the text width exceeds the control's width; clear it to restrict the caption to a single line. In the latter case, it will be clipped if it exceeds the control's width. | ||||||||||||||||||||||
Flat | Check this box to make the radio button appear flat; clear it for a beveled 3D edge. Note: This option does not have any effect when used under Windows XP with visual themes enabled; however, if you also select Transparent, the control reverts to its non-themed appearance and Flat can be used. |
||||||||||||||||||||||
Right button | Check this box to display the radio button to the right of the caption; clear it to display the radio button to the left. | ||||||||||||||||||||||
Push-like | Check this box to make the radio button appear as a PushButton control; clear it for a regular radio button. With this option checked, the control's "selected" state appears as a pushed-in button; its "deselected" state is a popped-up button. | ||||||||||||||||||||||
Link type | Select the desired link type from the drop-down list:
|
||||||||||||||||||||||
Component | Select the desired component by clicking on the ... button to open the Select Component dialog box and browse for the desired component. | ||||||||||||||||||||||
Symbol name | Enter the name of the symbolic variable to which the control must be linked, or click ... (browse) to open the Select Symbolic Variable dialog box that allows you to select a variable from the project. The named variable is set to the Symbol value value when the RadioButton control is selected. |
||||||||||||||||||||||
Indirect symbol | Check this box to make the Symbol name link indirect; clear it for a direct link. If the link is indirect, the variable specified in the Symbol name field is used to obtain the name of a second variable, and it is this second variable whose value is changed by the control. With a direct link, the variable specified by the Symbol name attribute itself is changed. | ||||||||||||||||||||||
Symbol value | Enter the value that must be assigned if the RadioButton control is selected. | ||||||||||||||||||||||
Font | Select the font style for the text in the control by clicking ... (browse) to open the Select Font Style dialog. If no font style is selected, the control uses the parent dialog's font style. You can remove the font style by clicking X (clear). |
||||||||||||||||||||||
Text color | Select the desired text color from the drop-down list. The following choices are available:
Note: The actual display colors depend on the Windows' settings. If the user has selected a different color scheme, then the control will use the appropriate colors from that scheme. |
||||||||||||||||||||||
Background | Select the desired background color from the drop-down list. The following choices are available:
Note: The actual display colors depend on the Windows' settings. If the user has selected a different color scheme, then the control will use the appropriate colors from that scheme. Note: If you select the Transparent (above), then the Backgnd color option will be ignored. |
||||||||||||||||||||||
Horizontal align | Select the desired horizontal alignment of the control's caption from the drop-down list. | ||||||||||||||||||||||
Vertical align | Select the desired vertical alignment of the control's caption from the drop-down list. | ||||||||||||||||||||||
Enabled Tab stop Group Border Sunken Client edge Visible Transparent Don't mirror |
These are all standard control styles; see Dialog control styles for a description. Note: If you select Transparent, then the Backgnd color option (see below) will be ignored. |
||||||||||||||||||||||
Condition | Enter the display condition for the control or leave empty to display the control unconditionally. See Dialog control conditions for more information. |