The following tasks are associated with using an IRadioButton*
part in visual composition. Tasks that are common to many parts
are described in related topics.
-
- Defining text for a radio button
- To set the text for the radio button, do either of the
following:
- On the composition surface, directly edit the
part text.
- In the part property sheet, enter the text in the
value column of the text property.
- Grouping radio buttons
- To enable automatic deselection of a radio button when
another radio button is selected, define a set of radio
buttons as a control group. The control group should
contain only the radio buttons. This procedure is
described in a related topic as a common task for
controls.
- Setting the initial state
- To set the initial state of the radio button, set the selected
property in the IRadioButton* property sheet. To
initially select the radio button, select true in
the value column. To initially not select the radio
button, select false. Ensure that only one radio
button in a control group is initially selected.
- Disabling another part
- To disable another control when the user selects the
radio button, connect the IRadioButton* selected
attribute to the value attribute of an
IVBBooleanPart* part. Then, connect the IVBBooleanPart* notValue
attribute to the enabled attribute of the other
control. When the user deselects the radio button, the
other control is enabled.
- Enabling another part
- To enable another control when the user selects the radio
button, connect the IRadioButton* selected
attribute to the enabled attribute of the other
control. When the user deselects the radio button, the
other control is disabled.
Common Tasks for Control Parts
Setting Part Style Properties
Setting Part Color Properties
Setting Part Font Properties
Setting Part Handlers
Properties
Setting Part Framing Properties
Editing Part Labels Directly
Working with VisualAge User
Interface Parts
IRadioButton
Property Settings --
IRadioButton
Portability --
IRadioButton