Advertisement
Guest User

R

a guest
Jan 9th, 2011
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
  3. xmlns:s="library://ns.adobe.com/flex/spark"
  4. xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
  5. <fx:Declarations>
  6. <!-- Place non-visual elements (e.g., services, value objects) here -->
  7. </fx:Declarations>
  8. <fx:Script>
  9. <![CDATA[
  10. import spark.components.NavigatorContent;
  11. import spark.components.Button;
  12. var but:Button;
  13. private function init():void
  14. {
  15. var temp1:NavigatorContent = new NavigatorContent();
  16. temp1.label="as-temp1";
  17.  
  18. var temp2:NavigatorContent = new NavigatorContent();
  19. temp2.label="as-temp2";
  20.  
  21. var temp3:NavigatorContent = new NavigatorContent();
  22. temp3.label="as-temp3";
  23. tabNav.addElementAt(temp1,1)
  24. tabNav.addElementAt(temp2,2)
  25. tabNav.addElementAt(temp3,3)
  26. tabNav.selectedIndex=2;
  27.  
  28. }
  29. ]]>
  30. </fx:Script>
  31. <mx:TabNavigator id= "tabNav" creationPolicy="all" x="20" y="100" height="300" width="800" tabWidth="150">
  32. <s:NavigatorContent id="navg0" label="mxm-temp0" tabIndex="0">
  33. <s:Label text ="in tab 0"/>
  34. </s:NavigatorContent>
  35. <s:NavigatorContent id="navg2" label="mxm-temp4" tabIndex="4">
  36. <s:Label text= "in tab 4"/>
  37. </s:NavigatorContent>
  38. </mx:TabNavigator>
  39. <s:Button click="init()"/>
  40. </s:Application>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement