Use Button to select Tab : TabNavigator « Container « Flex






Use Button to select Tab

Use Button to select Tab
        

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

    <mx:Panel title="TabNavigator" height="90%" width="90%">
        <mx:TabNavigator id="tn1" width="100%" height="100%" creationPolicy="all">
            <mx:VBox label="Panel 1">
                <mx:Label text="Panel 1" />
            </mx:VBox>
            <mx:VBox label="Panel 2">
                <mx:Label text="Panel 2" />
            </mx:VBox>
            <mx:VBox label="Panel 3">
                <mx:Label text="Panel 3" />
            </mx:VBox>
        </mx:TabNavigator>
        <mx:Label width="100%" text="Click on the button to choose a panel."/>
        <mx:HBox>
            <mx:Button label="Select Tab 1" click="tn1.selectedIndex=0"/>
            <mx:Button label="Select Tab 2" click="tn1.selectedIndex=1"/>
            <mx:Button label="Select Tab 3" click="tn1.selectedIndex=2"/>
        </mx:HBox>
    </mx:Panel>
</mx:Application>

   
    
    
    
    
    
    
    
  








Related examples in the same category

1.TabNavigator EffectTabNavigator Effect
2.Put VBox into TabNavigatorPut VBox into TabNavigator
3.Add Panel to TabNavigatorAdd Panel to TabNavigator
4.Contain a Spark List control and an TabNavigator containerContain a Spark List control and an TabNavigator container
5.NavigatorContent inside a TabNavigatorNavigatorContent inside a TabNavigator
6.Put Form into TabNavigatorPut Form into TabNavigator
7.Load the modules when navigating to tabs in TabNavigatorLoad the modules when navigating to tabs in TabNavigator
8.TabNavigator creation PolicyTabNavigator creation Policy
9.Load modules when the user navigates to the appropriate tabs in TabNavigatorLoad modules when the user navigates to the appropriate tabs in TabNavigator
10.Add child component to TabNavigatorAdd child component to TabNavigator
11.Enable child of TabNavigator
12.Disable TabControls Within a TabNavigator
13.Get child count in TabNavigator
14.TabNavigator containerTabNavigator container
15.Change URL as TabNavigator changedChange URL as TabNavigator changed
16.Using a tab navigator to created tabbed navigationUsing a tab navigator to created tabbed navigation
17.Responding to tab changes in a tab navigatorResponding to tab changes in a tab navigator
18.Using an event object to pass information about selected tabUsing an event object to pass information about selected tab