开发者

How to set tab index > 0 in TabNavigator at initilize, flex

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> 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜