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:
<js:CheckBox text="Click Me">
<js:style>
<js:SimpleCSSStyles fontFamily="serif" fontSize="20"
fontWeight="bold" fontStyle="italic" color="#ff0000"/>
</js:style>
</js:CheckBox>