标签:des style http color os 使用 io ar for
<s:ArrayCollection id="myAC"> <fx:Object label="item1" data="data1"/> <fx:Object label="item2" data="data2"/> <fx:Object label="item3" data="data3"/> </s:ArrayCollection>
<fx:Script> <![CDATA[ import mx.collections.ArrayCollection; public var myAc:ArrayCollection = new ArrayCollection([ { label:"item1", data:"data1"}, { label:"item2", data:"data2"}, { label:"item3", data:"data3"} ]); ]]> </fx:Script>
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <mx:List id="myFriends" x="10" y="10"> <fx:String>friend 1</fx:String> <fx:String>friend 2</fx:String> <fx:String>friend 3</fx:String> </mx:List> </s:Application>
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Declarations> <s:ArrayCollection id="myAC"> <fx:Object label="friend 1"/> <fx:Object label="friend 2"/> <fx:Object label="friend 3"/> </s:ArrayCollection> </fx:Declarations> <mx:List id="myFriends" x="10" y="10" dataProvider="{myAC}"> </mx:List> </s:Application>
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var myAC:ArrayCollection = new ArrayCollection([ {label:"friend 1"}, {label:"friend 2"}, {label:"friend 3"} ]); ]]> </fx:Script> <mx:List id="myFriends" x="10" y="10" dataProvider="{myAC}"> </mx:List> </s:Application>
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var myAC:ArrayCollection = new ArrayCollection([ {name:"friend 1"}, {name:"friend 2"}, {name:"friend 3"} ]); ]]> </fx:Script> <mx:List id="myFriends" x="10" y="10" dataProvider="{myAC}" labelField="name"> </mx:List> </s:Application>
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var myAC:ArrayCollection = new ArrayCollection([ {name:"friend 1"}, {name:"friend 2"}, {name:"friend 3"} ]); ]]> </fx:Script> <mx:HorizontalList id="myFriends" x="10" y="10" dataProvider="{myAC}" labelField="name"/> </s:Application>
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var myAC:ArrayCollection = new ArrayCollection([ {name:"friend 1"}, {name:"friend 2"}, {name:"friend 3"}, {name:"friend 4"}, {name:"friend 5"}, {name:"friend 6"}, {name:"friend 7"}, {name:"friend 8"} ]); ]]> </fx:Script> <mx:TileList id="myFriends" x="10" y="10" dataProvider="{myAC}" labelField="name" direction="vertical"/> </s:Application>
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <mx:DataGrid id="dg" width="500" height="200"> <mx:dataProvider> <fx:Object name="item1" email="item1@email.com"/> <fx:Object name="item2" email="item2@email.com"/> <fx:Object name="item3" email="item3@email.com"/> </mx:dataProvider> </mx:DataGrid> </s:Application>
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var myAC:ArrayCollection = new ArrayCollection([ {name:"item1", email:"item1@email.com", url:"www.url1.com"}, {name:"item2", email:"item2@email.com", url:"www.url2.com"}, {name:"item3", email:"item3@email.com", url:"www.url3.com"}, ]); ]]> </fx:Script> <mx:DataGrid id="dg" width="500" height="150" dataProvider="{myAC}"> <mx:columns> <mx:DataGridColumn dataField="name" headerText="Contact Name" width="300" /> <mx:DataGridColumn dataField="email" headerText="E-Mail" width="200" /> <mx:DataGridColumn dataField="url" headerText="Web Site" width="200" /> </mx:columns> </mx:DataGrid> </s:Application>
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Declarations> <fx:XMLList id="myXML"> <friends> <friend name="Item1"/> <friend name="Item2"/> <friend name="Item2"/> </friends> </fx:XMLList> </fx:Declarations> </s:Application>
<mx:XMLList source="my.xml" id="myXML"/>
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Declarations> <mx:XMLListCollection id="myXMLCollection"> <fx:XMLList id="myXML" xmlns=""> <friends label="Friends"> <friend label="Friend"/> </friends> <families label="Families"> <family label="Family"/> </families> </fx:XMLList> </mx:XMLListCollection> </fx:Declarations> </s:Application>
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Declarations> <mx:XMLListCollection id="myXMLCollection"> <fx:XMLList id="myXML" xmlns=""> <friends label="Friends"> <friend label="Friend1"/> <friend label="Friend2"/> <friend label="Friend3"/> </friends> <families label="Families"> <family label="Family1"/> <family label="Family2"/> </families> </fx:XMLList> </mx:XMLListCollection> </fx:Declarations> <mx:Tree dataProvider="{myXMLCollection}" labelField="@label" width="300" height="200"/> </s:Application>
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.events.ItemClickEvent; import mx.events.ListEvent; import mx.controls.Alert; [Bindable] public var myAC:ArrayCollection = new ArrayCollection([ {name:"item1",email:"item1@email.com"}, {name:"item2",email:"item2@email.com"} ]); public function contactDataGrid_clickHandler(event:ListEvent):void { Alert.show("You have clicked on row " + event.rowIndex + " and col " + event.columnIndex + "." + "Witch is for " + event.currentTarget.selectedItem.name); } ]]> </fx:Script> <mx:DataGrid id="contactDataGrid" width="500" height="150" dataProvider="{myAC}" itemClick="contactDataGrid_clickHandler( event )"> <mx:columns> <mx:DataGridColumn dataField="name" headerText="Contact Name" width="300"/> <mx:DataGridColumn dataField="email" headerText="E-mail" width="200"/> </mx:columns> </mx:DataGrid> </s:Application>
标签:des style http color os 使用 io ar for
原文地址:http://my.oschina.net/xuleo/blog/308527