Using an event object to pass information about selected tab : TabNavigator « Container « Flex






Using an event object to pass information about selected tab

Using an event object to pass information about selected tab
         
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="white">

    <mx:Script>
        
        import mx.controls.Alert;
        import mx.events.IndexChangedEvent;
        private function handleChange(evt:IndexChangedEvent):void
        {
            Alert.show(evt.currentTarget.selectedIndex + " Label: " + evt.currentTarget.selectedChild.label);
        }
      
    </mx:Script>
    <mx:TabNavigator width="200" height="100" id="myTabNav" change="handleChange(event)">
    </mx:TabNavigator>
</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.Use Button to select TabUse Button to select Tab
17.Using a tab navigator to created tabbed navigationUsing a tab navigator to created tabbed navigation
18.Responding to tab changes in a tab navigatorResponding to tab changes in a tab navigator