TabNavigator tab标签批改颜色

TabNavigator tab标签修改颜色TabNavigator有个方法“getTabAt(index:int):ButtonReturns the tab of the n

TabNavigator tab标签修改颜色
TabNavigator有个方法
“getTabAt(index:int):Button
Returns the tab of the navigator’s TabBar control at the specified index.”

方法返回的是Button,所以只需要在这个编辑这个Button的样式就可以了.
例如:
var btn:Button=this.myTn.getTabAt(0);
btn.setStyle(”fillColors”,[0xFFFF00, 0xFFFF00]);
btn.setStyle(”fillAlphas”,[1, 1]);
btn.width=180;