Okay, Agree with many here that not allowing the tabs to be clickable in a tabNavigator is a little uncommon usecase, I have a solution for the problem. I have extended TabNavigator to make TabNavigatorX, which achieves exactly what the requirement here is . Use the following code:

Main.mxml
------------------------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute">
    <TabNavigatorX x="88" id="tab" y="59" width="496" height="200">
        <mx:Canvas label="Tab 1" width="100%" height="100%">
        <mx:Button label="Next &gt;" click="tab.selectedIndex=1" x="419" y="135"/>
        </mx:Canvas>
        <mx:Canvas label="tab2" width="100%" height="100%">
        <mx:Button label="&lt; Back" x="419" y="135" click=" tab.selectedIndex=0"/>
        </mx:Canvas>
    </TabNavigatorX>
   
</mx:Application>


TabNavigatorX.as
---------------------------------------------------------------------------------------------------------------
package
{
    import mx.containers.TabNavigator;
    import mx.core.Container;
    import mx.controls.TabBar
    import flash.events.Event

    public class TabNavigatorX extends TabNavigator
    {
        public function TabNavigatorX()
        {
           
        }
        override protected function createChildren():void
        {
           
            super.createChildren();

            if (!tabBar)
            {
                tabBar = new TabBar();
                tabBar.name = "tabBar";
                tabBar.focusEnabled = false;
                tabBar.styleName = this;
   
                tabBar.setStyle("borderStyle", "none");
                tabBar.setStyle("paddingTop", 0);
                tabBar.setStyle("paddingBottom", 0);

            }
      }
      override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
      {
              super.updateDisplayList(unscaledWidth,unscaledHeight)
              rawChildren.addChild(tabBar);
              tabBar.setStyle("disabledOverlayAlpha",1);
              tabBar.setStyle("disabledColor",0x000000);
            tabBar.enabled=false;

           }
          }

    }
   

Hope this helps!

Thanks
Harish


__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to