blob: a418b54937507d5b74fcb4d0c923e0bdf9f3648a [file]
<s:TitleWindow
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
width="400" height="500">
<s:layout>
<s:VerticalLayout/>
</s:layout>
<s:states>
<s:State name="state01" />
<s:State name="state02" />
</s:states>
<fx:Script>
<![CDATA[
import flash.events.Event;
import mx.collections.ArrayCollection;
[Bindable]
private var d:ArrayCollection=new ArrayCollection([{slno:"1",name:"Joseph",age:"23"},{slno:"2",name:"Jeena",age:"21"},{slno:"3",name:"Jerry",age:"4"}
,{slno:"4",name:"Tom",age:"1"},{slno:"5",name:"Rick",age:"12"},{slno:"6",name:"John",age:"52"}]);
public function onBtnClick(event:Event):void
{
trace(event.currentTarget.label);
ta.text=event.currentTarget.label+" is clicked";
}
]]>
</fx:Script>
<s:CheckBox id="checkBox1" name="checkBox1" label="available" y="10" includeIn="state01"/>
<s:Button id="button1" y="35" label="test Button" name="childButton" />
<s:TextArea id="ta" text.state01="State One" color.state01="0xFF0000"
text.state02="State Two" color.state02="0x0000FF" height="150"/>
<mx:DataGrid y="120" name="datagrid1" id="dg1" dataProvider="{d}" includeIn="state02"/>
<s:controlBarContent >
<s:Label text="controlBar" includeIn="state01"/>
<s:Button id="button2" label="button2" includeIn="state01"/>
</s:controlBarContent>
</s:TitleWindow>