[Flex] ButtonBar系列——如何给ButtonBar添加一个ViewStack
2015-10-15 10:34
447 查看
<?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>
相关文章推荐
- openstack从零开始(2)——基础知识openstack中消息通信
- C#中的结构体与类的区别
- ECharts Y 轴 倒置
- linux配置JAVA环境
- 最大子序列和问题的解(共4种,层层推进)
- Qt OpenCV windows下配置
- 我的一个大缺点
- 制作中国范围地图的几点注意事项
- LeetCode——Gas Station
- 10月13日全球域名商(国际域名)解析量排行榜TOP20
- URAL 1156 Two Rounds (DFS二分染色 + 分组背包)
- CSS3属性之border-radius
- 13. 英语来信-回信 (5大句型)
- [144]Binary Tree Preorder Traversal
- jquery中innerWidth(),outerWidth(),outerWidth(true)和width()的区别
- Canvas Scaler
- Configure FTP with IIS Manager Authentication in IIS 7
- Android开发中,fragment无法找到Layout文件问题的原因与解决
- dao层的实现类中的配置BaseDao,所有的DaoImpl可以继承此类
- 讨论实现单片机程序架构(STC15W204S单片机)