当前位置: 代码迷 >> Web前端 >> ComboBox 组件应用
  详细解决方案

ComboBox 组件应用

热度:800   发布时间:2012-11-23 00:03:43.0
ComboBox 组件使用

<?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">
?<s:layout>
??<s:BasicLayout/>
?</s:layout>
?<fx:Declarations>
??<!-- 将非可视元素(例如服务、值对象)放在此处 -->
?</fx:Declarations>
?<fx:Script>
??<![CDATA[
???import mx.collections.ArrayCollection;
???[Bindable]
???private var myArray:ArrayCollection=new ArrayCollection(
????[
?????{name:"蛋蛋",age:"23"},
?????{name:"电电",age:"23"},
?????{name:"狗屁",age:"23"},
?????{name:"就是",age:"23"},
????]
???)
??]]>
?</fx:Script>
?<s:ComboBox id="combox" dataProvider="{myArray}" selectedIndex="2" labelField="name">
?</s:ComboBox>
</s:Application>

<!-- dataProvider 是绑定的数据源? select

  相关解决方案