ActionScript 2.0 Components Language Reference |
|
|
|
| RadioButton component > RadioButton.labelPlacement | |||
Flash Player 6 (6.0.79.0).
Flash MX 2004.
radioButtonInstance.labelPlacementradioButtonGroup.labelPlacement
Property; a string that indicates the position of the label in relation to a radio button. You can set this property for an individual instance or for a radio button group. If you set the property for a group, the label is placed in the appropriate position for each radio button in the group.
The following are the four possible values:
"right" The radio button is pinned to the upper left corner of the bounding area. The label is placed to the right of the radio button."left" The radio button is pinned to the upper right corner of the bounding area. The label is placed to the left of the radio button."bottom" The label is placed below the radio button. The radio button and label grouping are centered horizontally and vertically. If the bounding box of the radio button isn't large enough, the label is clipped."top" The label is placed above the radio button. The radio button and label grouping are centered horizontally and vertically. If the bounding box of the radio button isn't large enough, the label is clipped.The following code creates three radio buttons and uses the labelPlacement property to place the label for the second button on the left of the button.
You first drag a RadioButton component from the Components panel to the current document's library, and then add the following code to Frame 1 of the main timeline.
/**
Requires:
- RadioButton component in library
*/
import mx.controls.RadioButton;
this.createClassObject(RadioButton, "first_rb", 10, {label:"first", groupName:"radioGroup"});
this.createClassObject(RadioButton, "second_rb", 20, {label:"second", groupName:"radioGroup"});
this.createClassObject(RadioButton, "third_rb", 30, {label:"third", groupName:"radioGroup"});
// Position radio buttons on Stage.
second_rb.move(0, first_rb.y + first_rb.height);
third_rb.move(0, second_rb.y + second_rb.height);
second_rb.labelPlacement = "left";
|
|
|
|