Flex 导航控件学习笔记
2010-06-19 09:40
393 查看
Flex 导航学习笔记 收藏
一段时间没有学flex 来,今天把看到的笔记都记录下来。是一些导航的使用,可以尝试运行一下。感觉还不错ViewStack的使用
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:ViewStack id="boxstack">
<mx:VBox id="red" label="redbox" width="150" height="150" backgroundColor ="#FF0000"/>
<mx:VBox id="green" label="greenbox" width="150" height="150" backgroundColor="#00FF00"/>
<mx:VBox id="blue" label="bluebox" width="150" height="150" backgroundColor="#0000FF"/>
</mx:ViewStack>
<mx:HBox >
<mx:Button label="redbox" click="boxstack.selectedIndex=0"/>
<mx:Button label="greenbox" click="boxstack.selectedIndex=1"/>
<mx:Button label="bluebox" click="boxstack.selectedIndex=2"/>
</mx:HBox>
</mx:Application>
LinkBar 的使用
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:ViewStack id="boxstack">
<mx:VBox id="red" label="redbox" width="150" height="150" backgroundColor ="#FF0000"/>
<mx:VBox id="green" label="greenbox" width="150" height="150" backgroundColor="#00FF00"/>
<mx:VBox id="blue" label="bluebox" width="150" height="150" backgroundColor="#0000FF"/>
</mx:ViewStack>
<!--<mx:HBox >
<mx:Button label="redbox" click="boxstack.selectedIndex=0"/>
<mx:Button label="greenbox" click="boxstack.selectedIndex=1"/>
<mx:Button label="bluebox" click="boxstack.selectedIndex=2"/>
</mx:HBox>-->
<mx:LinkBar dataProvider="{boxstack}"/>
</mx:Application>
TabBar的使用
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:TabBar dataProvider="{boxstack}"/>
<mx:ViewStack id="boxstack">
<mx:VBox id="red" label="redbox" width="150" height="150" backgroundColor ="#FF0000"/>
<mx:VBox id="green" label="greenbox" width="150" height="150" backgroundColor="#00FF00"/>
<mx:VBox id="blue" label="bluebox" width="150" height="150" backgroundColor="#0000FF"/>
</mx:ViewStack>
<!--<mx:HBox >
<mx:Button label="redbox" click="boxstack.selectedIndex=0"/>
<mx:Button label="greenbox" click="boxstack.selectedIndex=1"/>
<mx:Button label="bluebox" click="boxstack.selectedIndex=2"/>
</mx:HBox>-->
</mx:Application>
ButtonBar的使用
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:ButtonBar dataProvider="{boxstack}"/>
<mx:ViewStack id="boxstack">
<mx:VBox id="red" label="redbox" width="150" height="150" backgroundColor ="#FF0000"/>
<mx:VBox id="green" label="greenbox" width="150" height="150" backgroundColor="#00FF00"/>
<mx:VBox id="blue" label="bluebox" width="150" height="150" backgroundColor="#0000FF"/>
</mx:ViewStack>
<!--<mx:HBox >
<mx:Button label="redbox" click="boxstack.selectedIndex=0"/>
<mx:Button label="greenbox" click="boxstack.selectedIndex=1"/>
<mx:Button label="bluebox" click="boxstack.selectedIndex=2"/>
</mx:HBox>-->
</mx:Application>
ToggleButtonBar的使用
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:ToggleButtonBar dataProvider="{boxstack}"/>
<mx:ViewStack id="boxstack">
<mx:VBox id="red" label="redbox" width="150" height="150" backgroundColor ="#FF0000"/>
<mx:VBox id="green" label="greenbox" width="150" height="150" backgroundColor="#00FF00"/>
<mx:VBox id="blue" label="bluebox" width="150" height="150" backgroundColor="#0000FF"/>
</mx:ViewStack>
<!--<mx:HBox >
<mx:Button label="redbox" click="boxstack.selectedIndex=0"/>
<mx:Button label="greenbox" click="boxstack.selectedIndex=1"/>
<mx:Button label="bluebox" click="boxstack.selectedIndex=2"/>
</mx:HBox>-->
</mx:Application>
TabNavigator 的使用
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:TabNavigator width="300" >
<mx:VBox id="red" label="redbox" width="100%" height="150" backgroundColor ="#FF0000"/>
<mx:VBox id="green" label="greenbox" width="100%" height="150" backgroundColor="#00FF00"/>
<mx:VBox id="blue" label="bluebox" width="100%" height="150" backgroundColor="#0000FF"/>
</mx:TabNavigator>
<!--<mx:HBox >
<mx:Button label="redbox" click="boxstack.selectedIndex=0"/>
<mx:Button label="greenbox" click="boxstack.selectedIndex=1"/>
<mx:Button label="bluebox" click="boxstack.selectedIndex=2"/>
</mx:HBox>-->
</mx:Application>
Accordion 的使用
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Accordion width="300" >
<mx:VBox id="red" label="redbox" width="100%" height="150" backgroundColor ="#FF0000"/>
<mx:VBox id="green" label="greenbox" width="100%" height="150" backgroundColor="#00FF00"/>
<mx:VBox id="blue" label="bluebox" width="100%" height="150" backgroundColor="#0000FF"/>
</mx:Accordion>
<!--<mx:HBox >
<mx:Button label="redbox" click="boxstack.selectedIndex=0"/>
<mx:Button label="greenbox" click="boxstack.selectedIndex=1"/>
<mx:Button label="bluebox" click="boxstack.selectedIndex=2"/>
</mx:HBox>-->
</mx:Application>
相关文章推荐
- ASP.NET学习笔记2----用站点导航控件与母版页搭建页面框架
- Flex权威指南3学习笔记之二------简单控件的使用
- Flex 导航学习笔记
- Flex 导航学习笔记
- ASP.NET控件开发学习笔记--第3回 自制导航控件
- Flex 导航学习笔记
- Flex 学习笔记 自定义时间控件(带分秒时显示)
- Flex 学习笔记 Datagrid中创建自定义ComboBox控件及数字校验
- Flex 学习笔记 flexlib控件之_Base64Image(图片Base64互换
- 孙鑫VC学习笔记:第十讲画图 改变对话框及控件的文字/背景颜色
- Flex学习笔记(三)——字符串的操作(String)
- Silverlight 2学习笔记二:三个基本布局控件(Canvas、StackPanel、Grid )
- Flex学习笔记第一季
- 《第一行代码》学习笔记-- 基础的自定义标题控件的定义和使用
- ios学习笔记——简单控件(开关、分段控件、滑块)
- [Flex]Adobe Flex/AIR学习路线(Flex部分之控件篇)
- DISCUZ 学习笔记四 SEO 设置 板块 分区 导航 模板 修改浏览器标签powerbydis
- Adobe&nbsp;FLEX学习笔记(1)-搭建AIR…
- Adobe&nbsp;FLEX学习笔记(6)-&nbsp;is&nbsp;运算…
- Adobe&nbsp;Flex学习笔记(14)-&nbsp;使用摄…