Customizing the CheckBox component

You can transform a CheckBox component horizontally and vertically both while authoring and at runtime. While authoring, select the component on the Stage and use the Free Transform tool or any of the Modify > Transform commands. At runtime, use the setSize() method (UIObject.setSize()) or any applicable properties and methods of the CheckBox class (see CheckBox class). Resizing the check box does not change the size of the label or the check box icon; it only changes the size of the bounding box.

The bounding box of a CheckBox instance is invisible and also designates the hit area for the instance. If you increase the size of the instance, you also increase the size of the hit area. If the bounding box is too small to fit the label, the label clips to fit.

Using styles with the CheckBox component

You can set style properties to change the appearance of a CheckBox instance. If the name of a style property ends in "Color", it is a color style property and behaves differently than non-color style properties. For more information, see Using styles to customize component color and text.

A CheckBox component supports the following Halo styles:

Style

Description

themeColor

The background of a component. This is the only color style that doesn't inherit its value. Possible values are "haloGreen", "haloBlue", and "haloOrange".

color

The text of a component label.

disabledColor

The disabled color for text.

fontFamily

The font name for text.

fontSize

The point size for the font.

fontStyle

The font style: either "normal", or "italic".

fontWeight

The font weight: either "normal", or "bold".

textDecoration

The text decoration: either "none", or "underline".

Using skins with the CheckBox component

The CheckBox component uses symbols in the Library panel to represent the button states. To skin the CheckBox component while authoring, modify symbols in the Library panel. The CheckBox component skins are located in the Flash UI Components 2/Themes/MMDefault/CheckBox Assets/states folder in the library of either the HaloTheme.fla file or the SampleTheme.fla file. For more information, see About skinning components.

A CheckBox component uses the following skin properties:

Property

Description

falseUpSkin

The up state. Default is RectBorder.

falseDownSkin

The pressed state. Default is RectBorder.

falseOverSkin

The over state. Default is RectBorder.

falseDisabledSkin

The disabled state. Default is RectBorder.

trueUpSkin

The toggled state. Default is RectBorder.

trueDownSkin

The pressed-toggled state. Default is RectBorder.

trueOverSkin

The over-toggled state. Default is RectBorder.

trueDisabledSkin

The disabled-toggled state. Default is RectBorder.