[Flex] ButtonBar系列——如何给ButtonBar添加一个ViewStack
2024-10-08 02:08:31
<?xml version="1.0" encoding="utf-8"?>
<!--如何给ButtonBar添加一个ViewStack-->
<!--<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white">
<mx:ButtonBar id="buttonBar" dataProvider="{viewStack}" buttonHeight="32"/>
<mx:ViewStack id="viewStack">
<mx:VBox label="Button" icon="@Embed('assets/Button.png')" backgroundColor="white" width="480" height="60">
<mx:Label text="Button..."/>
</mx:VBox>
<mx:VBox label="ButtonBar" icon="@Embed('assets/ButtonBar.png')" backgroundColor="white" width="480" height="60">
<mx:Label text="ButtonBar..."/>
</mx:VBox>
<mx:VBox label="CheckBox" icon="@Embed('assets/CheckBox.png')" backgroundColor="white" width="480" height="60">
<mx:Label text="CheckBox..."/>
</mx:VBox>
<mx:VBox label="ColorPicker" icon="@Embed('assets/ColorPicker.png')" backgroundColor="white" width="480" height="60">
<mx:Label text="ColorPicker..."/>
</mx:VBox>
</mx:ViewStack>
</mx:Application>-->
<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">
<fx:Declarations> </fx:Declarations>
<s:VGroup>
<s:ButtonBar dataProvider="{myViewStack}" requireSelection="true" />
<mx:ViewStack id="myViewStack" borderStyle="solid">
<s:NavigatorContent id="search" label="Search">
<s:Label text="Search Screen"/>
</s:NavigatorContent> <s:NavigatorContent id="custInfo" label="Customer Info">
<s:Label text="Customer Info"/>
</s:NavigatorContent> <s:NavigatorContent id="accountInfo" label="Account Info">
<s:Label text="Account Info"/>
</s:NavigatorContent>
</mx:ViewStack>
<s:ButtonBar id="buttonBar" dataProvider="{viewStack}" requireSelection="true" />
<mx:ViewStack id="viewStack">
<mx:VBox label="Button" icon="@Embed('assets/Button.png')" backgroundColor="white" width="480" height="60">
<mx:Label text="Button..."/>
</mx:VBox>
<mx:VBox label="ButtonBar" icon="@Embed('assets/ButtonBar.png')" backgroundColor="white" width="480" height="60">
<mx:Label text="ButtonBar..."/>
</mx:VBox>
<mx:VBox label="CheckBox" icon="@Embed('assets/CheckBox.png')" backgroundColor="white" width="480" height="60">
<mx:Label text="CheckBox..."/>
</mx:VBox>
<mx:VBox label="ColorPicker" icon="@Embed('assets/ColorPicker.png')" backgroundColor="white" width="480" height="60">
<mx:Label text="ColorPicker..."/>
</mx:VBox>
</mx:ViewStack>
</s:VGroup>
</s:Application>
最新文章
- c#3.0新特性
- 按Enter键执行表单验证
- 用tcpdump分析tcp三次握手,四次挥手
- Apache Shiro 简单概念
- CSS hack技术
- (1)第一个ASP.NET Web API
- C primer plus 练习题 第二章
- 2016 系统设计第一期 (档案一)MVC ajax 获取json数据
- NOI2002 荒岛野人
- Android ActionBar详解(三):ActionBar实现切换Tabs标签
- hbase 单机模式安装
- PHP实现微信模板消息发送给指定用户
- JS上传文件、导入文件
- 51Nod1868 彩色树 虚树
- 怎样动态地插入不会暴露给用户的JS文件
- [转载]ViewPort <;meta>;标记
- js使用正则替换掉所有的“”
- Flutter学习笔记(四)--Flutter几个小知识点
- 【转】Ultra simple ISO-7816 Interface
- 三剑客之sed&;grep