Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A selectable component that includes a text label.

Add a text label

Display text in a button:

<js:CheckBox text="Click Me"/>

Change selection

Set the initial selection:

<js:CheckBox selected="true"/>

Listen to events

Listen for a button click event:

<js:CheckBox text="Click Me" change="onChange()"/>
<fx:Script>
<![CDATA[
private function onChange():void
{
trace("check box change!", check.selected);
}
]]>
</fx:Script>

Change check box appearance

Set font styles on a single check box:

...