Flex 導航控制項學習筆記

來源:互聯網
上載者:User
Flex 導航學習筆記 收藏

一段時間沒有學flex 來,今天把看到的筆記都記錄下來。是一些導航的使用,可以嘗試運行一下。感覺還不錯

  1. ViewStack的使用
  2. <?xml version="1.0" encoding="utf-8"?>
  3. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
  4.     <mx:ViewStack id="boxstack">
  5.     <mx:VBox id="red" label="redbox" width="150" height="150" backgroundColor ="#FF0000"/>
  6.     <mx:VBox id="green" label="greenbox"  width="150" height="150" backgroundColor="#00FF00"/>  
  7.     <mx:VBox id="blue" label="bluebox"  width="150" height="150" backgroundColor="#0000FF"/>
  8.     </mx:ViewStack>
  9.   <mx:HBox >
  10.   <mx:Button label="redbox" click="boxstack.selectedIndex=0"/>
  11.    <mx:Button label="greenbox" click="boxstack.selectedIndex=1"/>
  12.    <mx:Button label="bluebox" click="boxstack.selectedIndex=2"/>
  13.   </mx:HBox>
  14. </mx:Application>
  15. LinkBar 的使用
  16. <?xml version="1.0" encoding="utf-8"?>
  17. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
  18.     <mx:ViewStack id="boxstack">
  19.     <mx:VBox id="red" label="redbox" width="150" height="150" backgroundColor ="#FF0000"/>
  20.     <mx:VBox id="green" label="greenbox"  width="150" height="150" backgroundColor="#00FF00"/>  
  21.     <mx:VBox id="blue" label="bluebox"  width="150" height="150" backgroundColor="#0000FF"/>
  22.     </mx:ViewStack>
  23.   <!--<mx:HBox >
  24.   <mx:Button label="redbox" click="boxstack.selectedIndex=0"/>
  25.    <mx:Button label="greenbox" click="boxstack.selectedIndex=1"/>
  26.    <mx:Button label="bluebox" click="boxstack.selectedIndex=2"/>
  27.   </mx:HBox>-->
  28. <mx:LinkBar dataProvider="{boxstack}"/>
  29. </mx:Application>
  30. TabBar的使用
  31. <?xml version="1.0" encoding="utf-8"?>
  32. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
  33. <mx:TabBar dataProvider="{boxstack}"/>
  34.     <mx:ViewStack id="boxstack">
  35.     <mx:VBox id="red" label="redbox" width="150" height="150" backgroundColor ="#FF0000"/>
  36.     <mx:VBox id="green" label="greenbox"  width="150" height="150" backgroundColor="#00FF00"/>  
  37.     <mx:VBox id="blue" label="bluebox"  width="150" height="150" backgroundColor="#0000FF"/>
  38.     </mx:ViewStack>
  39.   <!--<mx:HBox >
  40.   <mx:Button label="redbox" click="boxstack.selectedIndex=0"/>
  41.    <mx:Button label="greenbox" click="boxstack.selectedIndex=1"/>
  42.    <mx:Button label="bluebox" click="boxstack.selectedIndex=2"/>
  43.   </mx:HBox>-->
  44. </mx:Application>
  45. ButtonBar的使用
  46. <?xml version="1.0" encoding="utf-8"?>
  47. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
  48. <mx:ButtonBar dataProvider="{boxstack}"/>
  49.     <mx:ViewStack id="boxstack">
  50.     <mx:VBox id="red" label="redbox" width="150" height="150" backgroundColor ="#FF0000"/>
  51.     <mx:VBox id="green" label="greenbox"  width="150" height="150" backgroundColor="#00FF00"/>  
  52.     <mx:VBox id="blue" label="bluebox"  width="150" height="150" backgroundColor="#0000FF"/>
  53.     </mx:ViewStack>
  54.   <!--<mx:HBox >
  55.   <mx:Button label="redbox" click="boxstack.selectedIndex=0"/>
  56.    <mx:Button label="greenbox" click="boxstack.selectedIndex=1"/>
  57.    <mx:Button label="bluebox" click="boxstack.selectedIndex=2"/>
  58.   </mx:HBox>-->
  59. </mx:Application>
  60. ToggleButtonBar的使用
  61. <?xml version="1.0" encoding="utf-8"?>
  62. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
  63. <mx:ToggleButtonBar dataProvider="{boxstack}"/>
  64.     <mx:ViewStack id="boxstack">
  65.     <mx:VBox id="red" label="redbox" width="150" height="150" backgroundColor ="#FF0000"/>
  66.     <mx:VBox id="green" label="greenbox"  width="150" height="150" backgroundColor="#00FF00"/>  
  67.     <mx:VBox id="blue" label="bluebox"  width="150" height="150" backgroundColor="#0000FF"/>
  68.     </mx:ViewStack>
  69.   <!--<mx:HBox >
  70.   <mx:Button label="redbox" click="boxstack.selectedIndex=0"/>
  71.    <mx:Button label="greenbox" click="boxstack.selectedIndex=1"/>
  72.    <mx:Button label="bluebox" click="boxstack.selectedIndex=2"/>
  73.   </mx:HBox>-->
  74. </mx:Application>
  75. TabNavigator 的使用
  76. <?xml version="1.0" encoding="utf-8"?>
  77. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
  78.     <mx:TabNavigator   width="300" >
  79.     
  80.     <mx:VBox id="red" label="redbox" width="100%" height="150" backgroundColor ="#FF0000"/>
  81.     <mx:VBox id="green" label="greenbox"  width="100%" height="150" backgroundColor="#00FF00"/> 
  82.     <mx:VBox id="blue" label="bluebox"  width="100%" height="150" backgroundColor="#0000FF"/>
  83.     </mx:TabNavigator>
  84.   <!--<mx:HBox >
  85.   <mx:Button label="redbox" click="boxstack.selectedIndex=0"/>
  86.    <mx:Button label="greenbox" click="boxstack.selectedIndex=1"/>
  87.    <mx:Button label="bluebox" click="boxstack.selectedIndex=2"/>
  88.   </mx:HBox>-->
  89. </mx:Application>
  90. Accordion  的使用
  91. <?xml version="1.0" encoding="utf-8"?>
  92. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
  93.     <mx:Accordion   width="300" >
  94.     
  95.     <mx:VBox id="red" label="redbox" width="100%" height="150" backgroundColor ="#FF0000"/>
  96.     <mx:VBox id="green" label="greenbox"  width="100%" height="150" backgroundColor="#00FF00"/> 
  97.     <mx:VBox id="blue" label="bluebox"  width="100%" height="150" backgroundColor="#0000FF"/>
  98.     </mx:Accordion>
  99.   <!--<mx:HBox >
  100.   <mx:Button label="redbox" click="boxstack.selectedIndex=0"/>
  101.    <mx:Button label="greenbox" click="boxstack.selectedIndex=1"/>
  102.    <mx:Button label="bluebox" click="boxstack.selectedIndex=2"/>
  103.   </mx:HBox>-->
  104. </mx:Application>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.