老外 的 下拉 树
发布时间:2020-12-15 01:37:50 所属栏目:百科 来源:网络整理
导读:老外 的 下拉 树 http://www.myflexiblelife.com/2009/07/22/how-to-combine-the-power-of-a-flex-tree-control-within-a-combobox/ ?xml version= "1.0" ? mx:Application xmlns:mx= "http://www.adobe.com/2006/mxml" xmlns:wg= "com.webgriffe.components
老外 的 下拉 树 http://www.myflexiblelife.com/2009/07/22/how-to-combine-the-power-of-a-flex-tree-control-within-a-combobox/
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:wg="com.webgriffe.components.*" creationComplete="loadXML()"> ? <mx:Script> <![CDATA[ import mx.collections.XMLListCollection; import mx.rpc.events.ResultEvent; import mx.rpc.http.mxml.HTTPService; ? public var xmlService:HTTPService = new HTTPService(); ? [Bindable] public var xmlResult:XML; ? [Bindable] public var xmlList:XMLList; ? [Bindable] public var xmlTeams:XMLListCollection; ? public function loadXML():void { xmlService.url = "mlb.xml" xmlService.resultFormat = "e4x"; xmlService.addEventListener(ResultEvent.RESULT,resultHandler); xmlService.send(); } ? public function resultHandler(event:ResultEvent):void { xmlResult = XML(event.result); xmlList = xmlResult.league; xmlTeams = new XMLListCollection(xmlList); } ]]> </mx:Script> <wg:TreeComboBox width="200" treeHeight="250" dataProvider="{xmlTeams}" labelField="@label" /> </mx:Application> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |