How to set tab index > 0 in TabNavigator control at i开发者_Python百科nitilize, flex
There is a property selectedIndex which you can set. Look here
There is a bug in Flex 3, extend the TabNavigator and make a component with the following. After that selectedIndex works.
<mx:TabNavigator xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
override protected function commitSelectedIndex(newIndex:int):void
{
super.commitSelectedIndex(newIndex);
tabBar.selectedIndex = newIndex;
}
]]>
</mx:Script>
</mx:TabNavigator>
精彩评论