CheckBox.labelPlacement

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Usage

checkBoxInstance.labelPlacement

Description

Property; a string that indicates the position of the label in relation to the check box. The following are the four possible values (the dotted lines represent the bounding area of the component; they are invisible in a document):

Example

The following example sets the placement of the label to the left of the check box:

checkBox_mc.labelPlacement = "left";

The following example uses ActionScript to create check box instances. The check box instance right_ch has its label and labelPlacement properties set within the method UIObject.createClassObject(). The check box instance left_ch has its label and labelPlacement properties set in separate declarations. Drag the CheckBox component from the Components panel to the current document's library (so the component appears in your library, but not on the Stage). Then add the following ActionScript to the first frame of the main timeline:

this.createClassObject(mx.controls.CheckBox, "right_ch", 1, {label:"Right", labelPlacement:"right"});
right_ch.move(10, 10);
this.createClassObject(mx.controls.CheckBox, "left_ch", 2);
left_ch.label= "Left";
left_ch.labelPlacement = "left";
left_ch.move(10, 30);

See also

CheckBox.label