Flex Tab Navigator example

Tab Navigators are containers in flex. In the following code, three tabs have been created using VBox containers. In the example wipe effect is also demonstrated.

Flex Tab Navigator example

Flex Tab Navigator example

     

Under mx.containers package TabNavigator class is present and under this class TabNavigator container is present.
Tab Navigators are Navigator containers of flex. In the following code, three tabs have been created using flex Layout container VBox. In the example wipe effect behavior is also demonstrated. 

 

 

 

 

 

 

 

navigator.mxml

<?xml version = '1.0' encoding = 'utf-8'?>
<mx:Application xmlns:mx = 'http://www.adobe.com/2006/mxml'>
  
  <mx:WipeLeft id = 'wipe_left'/>
  
  <mx:Panel title = 'Tab Navigators' width = '100%
  h
eight = '100%'>
  <mx:TabNavigator width = '100%' height = '100%'>
  
  <mx:VBox label = 'Panel 1' showEffect = '{wipe_left}'>
  <mx:Text text = 'You switched Panel1 Tab '
     
color = '#996600'/>
  </mx:VBox>
  
  <mx:VBox label = 'Panel 2' showEffect = '{wipe_left}'>
  <mx:Text text = 'You switched Panel2 Tab
   c
olor = '#FF9900'/>
  </mx:VBox>
  
  <mx:VBox label = 'Panel 3' showEffect = '{wipe_left}'>
  <mx:Text text = 'You switched Panel3 Tab
   c
olor = '#9966CC'/>
  </mx:VBox>
  
  </mx:TabNavigator>
  </mx:Panel>
  
</mx:Application>

navigator.swf

 

Download the code