首页» FLEX »FLEX例子之链接切换条(LinkBar)

FLEX例子之链接切换条(LinkBar)

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

这个例子进行的是UI Controls:Buttons:
简介:
A control defines a horizontal or vertical row of LinkButton controls that designate a series of link destinations. You typically use a control to control the active child container of a ViewStack container, or to create a stand-alone set of links.
例子:

<?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:Panel title="LinkBar Control" layout="vertical" color="0xffffff" borderAlpha="0.15" height="240" width="550"
         paddingTop="10" paddingRight="10" paddingBottom="10" paddingLeft="10" horizontalAlign="center">
 
         <mx:Text width="100%" color="0x323232" textAlign="center"
            text="Select a link in the LinkBar control to set the active child of the ViewStack container."/>
 
        <mx:LinkBar color="0x0050AA" horizontalAlign="center" width="100%" fontWeight="bold" dataProvider="{myViewStack}" borderColor="0xACACAC" borderStyle="solid"/>
<!--使用 LinkBar 控件来控制 ViewStack 容器的活动子容器或创建一组独立的链接,linkbar的数据来源是ViewStack中vbox的Label值-->
        <!-- Define the ViewStack and the three child containers -->
        <mx:ViewStack id="myViewStack" borderStyle="solid" width="100%" height="80%" color="0x323232">
 
            <mx:VBox id="search" label="Search" backgroundColor="0xDCDCDC" width="100%" height="100%" fontWeight="bold" >
                <mx:Label text="Search Panel" width="100%" textAlign="center" paddingTop="10" />
                <mx:HBox width="100%" horizontalAlign="center" >
                    <mx:TextInput id="Searchtxt" width="200" />
                    <mx:Button label="search" click="Searchtxt.text=''" />
                </mx:HBox>
            </mx:VBox>
 
            <mx:VBox id="custInfo" label="Customer Info" backgroundColor="0xDCDCDC" width="100%" height="100%" fontWeight="bold" horizontalAlign="center" >
                <mx:Label text="Customer Info" width="100%" textAlign="center" paddingTop="10" />
                <mx:HBox width="100%" horizontalAlign="center">
 
                    <mx:Label text="Email Address"/>
                    <mx:TextInput id="email" width="200"/>
                    <mx:Button label="Submit" click="email.text='';" />
                </mx:HBox>
 
            </mx:VBox>
 
            <mx:VBox id="accountInfo" label="Account Info" backgroundColor="0xDCDCDC" width="100%" height="100%" fontWeight="bold" >
                <mx:Label text="Account Info" width="100%" textAlign="center" paddingTop="10" />
                <mx:HBox width="100%" horizontalAlign="center">
                    <mx:Button label="Purchases" />
                    <mx:Button label="Sales" />
                    <mx:Button label="Reports" />
 
                </mx:HBox>
            </mx:VBox>
 
 
        </mx:ViewStack>
 
    </mx:Panel>
 
</mx:Application>

标签:, , ,

与"FLEX例子之链接切换条(LinkBar)"相关的文章:

没有评论 »

还没有评论呢。

留下评论

emoticons

Feedback Form