how to set backroundcolor
Is there a way to set a common Backgroundcolor for all the tabs in a given TabBar?
Rightnow I am able to set color on开发者_如何学Cly for selected tabs using
tabBar.getChildAt and setStyle
Give them all a common styleName
and set the backgroundColor style in CSS.
MXML
<mx:TabNavigator width="100%" height="100%">
<mx:VBox label="Tab 1" styleName="tabContainers"></mx:VBox>
<mx:VBox label="Tab 2" styleName="tabContainers"></mx:VBox>
<mx:VBox label="Tab 2" styleName="tabContainers"></mx:VBox>
</mx:TabNavigator>
CSS:
.tabContainers
{
backgroundColor: #ff0000;
}
精彩评论