Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <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>
- <!-- Place non-visual elements (e.g., services, value objects) here -->
- </fx:Declarations>
- <fx:Script>
- <![CDATA[
- import spark.components.NavigatorContent;
- import spark.components.Button;
- var but:Button;
- private function init():void
- {
- var temp1:NavigatorContent = new NavigatorContent();
- temp1.label="as-temp1";
- var temp2:NavigatorContent = new NavigatorContent();
- temp2.label="as-temp2";
- var temp3:NavigatorContent = new NavigatorContent();
- temp3.label="as-temp3";
- tabNav.addElementAt(temp1,1)
- tabNav.addElementAt(temp2,2)
- tabNav.addElementAt(temp3,3)
- tabNav.selectedIndex=2;
- }
- ]]>
- </fx:Script>
- <mx:TabNavigator id= "tabNav" creationPolicy="all" x="20" y="100" height="300" width="800" tabWidth="150">
- <s:NavigatorContent id="navg0" label="mxm-temp0" tabIndex="0">
- <s:Label text ="in tab 0"/>
- </s:NavigatorContent>
- <s:NavigatorContent id="navg2" label="mxm-temp4" tabIndex="4">
- <s:Label text= "in tab 4"/>
- </s:NavigatorContent>
- </mx:TabNavigator>
- <s:Button click="init()"/>
- </s:Application>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement