首页» FLEX »FLEX例子之List(列表)

FLEX例子之List(列表)

立即注册PayPal并开始接受信用卡付款。
转载请保持文章完整性!
本文链接地址:http://blog.desizen.com/4lone/447.html
主页:joel's blog

这个例子进行的是UI Controls: Controls:
这个是个纵向延伸的列表
介绍:The control displays a vertical of items. Its functionality is very similar to that of the SELECT form element in HTML. If there are more items than can be displayed at once, it can display a vertical scroll bar so the user can access all items in the . An optional horizontal scroll bar lets the user view items when the full width of the items is unlikely to fit. The user can select one or more items from the , depending on the value of the allowMultipleSelection property.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="top"
    horizontalAlign="center" backgroundGradientColors="[0x000000,0x323232]" paddingTop="0" viewSourceURL="srcview/index.html">
 
    <mx:Script>
        <![CDATA[
            [Bindable]
            public var selectedItem:Object;
       ]]>
    </mx:Script>
 
 
    <mx:Model id="mystates">
      <states>
        <state label="Alabama" data="AL"/>
        <state label="Alaska" data="AK"/>
        <state label="Arizona" data="AZ"/>
        <state label="Arkansas" data="AR"/>
        <state label="California" data="CA"/>
        <state label="Colorado" data="CO"/>
        <state label="Connecticut" data="CT"/>
      </states>
    </mx:Model>
 
    <mx:Panel title="List Control" layout="vertical" color="0xffffff" borderAlpha="0.15"
         paddingTop="2" paddingRight="10" paddingBottom="10" paddingLeft="10" horizontalAlign="center">
 
         <mx:Label color="0x323232" text="Select a state to see its abbreviation." />
 
        <mx:List id="source" width="100%" color="0x0050AA" dataProvider="{mystates.state}" height="120"
            change="this.selectedItem=List(event.target).selectedItem" />
 
        <mx:VBox width="100%" color="0x323232">
            <mx:Label text="Selected State: {selectedItem.label}"/>
            <mx:Label text="State abbreviation: {selectedItem.data}"/>
        </mx:VBox>
 
    </mx:Panel>
</mx:Application>

标签:, , ,

与"FLEX例子之List(列表)"相关的文章:

没有评论 »

还没有评论呢。

留下评论

emoticons

Feedback Form