<?xml version="1.0" encoding="utf-8"?>
<viewer:BaseWidget xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:viewer="com.esri.viewer.*"
xmlns:HelloWorld="widgets.Samples.HelloWorld.*"
xmlns:cityName="test.cityName.*"
height="500" borderColor="#DA6B6B" creationComplete="init()" layout="absolute">
<fx:Declarations>
<fx:Array id="arr">
<fx:String>flex</fx:String>
<fx:String>flash</fx:String>
<fx:String>builder</fx:String>
</fx:Array>
<s:ArrayCollection id="arr_keySetup">
<s:source>
<fx:Array>
<fx:Object label="aaa" data="00" sel="false">
</fx:Object>
<fx:Object label="bbb" data="10" sel="false">
</fx:Object>
<fx:Object label="ccc" data="20" sel="true">
</fx:Object>
</fx:Array>
</s:source>
</s:ArrayCollection>
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.controls.Image;
import mx.events.FlexEvent;
import mx.events.ListEvent;
private var coll:ArrayCollection;
private function init():void
{
accordion.getHeaderAt(1).setStyle("color",'red');
}
]]>
</fx:Script>
<viewer:WidgetTemplate>
<s:Group>
<s:layout>
<s:HorizontalLayout gap="1">
</s:HorizontalLayout>
</s:layout>
<mx:Accordion id="accordion" width="100%" height="100%" creationComplete="init();">
<mx:VBox label="Red">
<mx:TileList id="tlist" width="100%"
dataProvider="{arr_keySetup}" maxColumns="1">
<mx:itemRenderer>
<fx:Component>
<mx:HBox width="145" height="41" horizontalScrollPolicy="off"
verticalScrollPolicy="off">
<mx:VBox width="40" height="100%">
<mx:Image width="40" buttonMode="true" click="imgclick(event)"
data="{data.label}" source="assets\images\de.png">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
public function imgclick(evt:MouseEvent):void
{
var img:Image = evt.currentTarget as Image;
Alert.show(img.data.toString());
}
]]>
</fx:Script>
</mx:Image>
</mx:VBox>
<mx:VBox width="95" height="100%">
<mx:Label text="{data.label}" toolTip="{data.label}">
</mx:Label>
<mx:Image width="16" height="20" buttonMode="true" source="assets\images\br.png"
toolTip="see movie">
</mx:Image>
</mx:VBox>
</mx:HBox>
</fx:Component>
</mx:itemRenderer>
</mx:TileList>
</mx:VBox>
<mx:VBox label="Orange">
</mx:VBox>
<mx:VBox label="Yellow"/>
<mx:VBox label="Green"/>
<mx:VBox label="Blue"/>
<mx:VBox label="eeeee">
</mx:VBox>
</mx:Accordion>
</s:Group>
</viewer:WidgetTemplate>
</viewer:BaseWidget>