Flex中如何通过tabOffset样式,控制TabNavigator的Tabs的横向位置

main.mxml

  1. <?xml version="1.0"?>
  2. <mx:Applicationxmlns:mx="http://www.adobe.com/2006/mxml"
  3. layout="vertical"
  4. verticalAlign="middle"
  5. backgroundColor="white">
  6. <mx:ApplicationControlBardock="true">
  7. <mx:Form>
  8. <mx:FormItemlabel="tabOffset:">
  9. <mx:HSliderid="slider"
  10. minimum="-100"
  11. maximum="100"
  12. value="0"
  13. snapInterval="1"
  14. tickInterval="10"
  15. dataTipPrecision="0"
  16. liveDragging="true"/>
  17. </mx:FormItem>
  18. <mx:FormItemlabel="horizontalAlign:">
  19. <mx:ComboBoxid="comboBox">
  20. <mx:dataProvider>
  21. <mx:Array>
  22. <mx:String>left</mx:String>
  23. <mx:String>center</mx:String>
  24. <mx:String>right</mx:String>
  25. </mx:Array>
  26. </mx:dataProvider>
  27. </mx:ComboBox>
  28. </mx:FormItem>
  29. </mx:Form>
  30. </mx:ApplicationControlBar>
  31. <mx:TabNavigatorid="tabNavigator"
  32. width="100%"
  33. height="100%"
  34. tabOffset="{slider.value}"
  35. horizontalAlign="{comboBox.selectedItem}">
  36. <mx:VBoxlabel="Panel 1" backgroundColor="haloOrange">
  37. <mx:Labeltext="TabNavigator container panel 1"/>
  38. </mx:VBox>
  39. <mx:VBoxlabel="Panel 2" backgroundColor="haloGreen">
  40. <mx:Labeltext="TabNavigator container panel 2"/>
  41. </mx:VBox>
  42. <mx:VBoxlabel="Panel 3" backgroundColor="haloBlue">
  43. <mx:Labeltext="TabNavigator container panel 3"/>
  44. </mx:VBox>
  45. <mx:VBoxlabel="Panel 4" backgroundColor="haloSilver">
  46. <mx:Labeltext="TabNavigator container panel 4"/>
  47. </mx:VBox>
  48. </mx:TabNavigator>
  49. </mx:Application>

你可能感兴趣的:(xml,Flex,Adobe)