CheckBox class

Inheritance UIObject > UIComponent > SimpleButton > Button > CheckBox

ActionScript Class Namespace mx.controls.CheckBox

The properties of the CheckBox class allow you to create a text label and position it to the left, right, top, or bottom of a check box at runtime.

Setting a property of the CheckBox class with ActionScript overrides the parameter of the same name set in the Property inspector or Component Inspector panel.

The CheckBox component uses the FocusManager to override the default Flash Player focus rectangle and draw a custom focus rectangle with rounded corners. For more information, see Creating custom focus navigation.

Each component class has a version property which is a class property. Class properties are only available on the class itself. The version property returns a string that indicates the version of the component. To access the version property, use the following code:

trace(mx.controls.CheckBox.version);

Note: The following code returns undefined: trace(myCheckBoxInstance.version);.

Property summary for the CheckBox class

Property

Description

CheckBox.label

Specifies the text that appears next to a check box.

CheckBox.labelPlacement

Specifies the orientation of the label text in relation to a check box.

CheckBox.selected

Specifies whether the check box is selected (true) or deselected (false).

Inherits all properties from UIObject class and UIComponent class.

Method summary for the CheckBox class

Inherits all methods from UIObject class and UIComponent class.

Event summary for the CheckBox class

Event

Description

CheckBox.click

Triggered when the mouse is pressed over a button instance.

Inherits all events from UIObject class and UIComponent class.