Use List-based Form Controls不知道怎么翻,大致是这个意思了。这个例子主要讲了ComboBox的使用。
<mx:dataProvider>
<mx:Array>
......之间可以使用两种tag......
</mx:Array>
</mx:dataProvider>
1。一种是<mx:String>...</mx:String>,可以用一个label绑定它中间的值.
2。另一种是<mx:Object label="..." data="..."/>,label属性是显示的值;data属性是它的value值,可以用label绑定。The value property contains the value of the selected item. When a data field is
specified, the value property refers to the data field, not the label field. In
the example, the cbxRating.value property could contain the values 5, 3, or 1,
depending on the user's selection。
label标签中用{}绑定控件的值,如:<mx:Label x="20" y="120" text="{cbxRating.value}"/>
以下是MXML代码:
程序代码
admin#flashas.net (#为@) 联系QQ:
:40777822
浙ICP备06033001号