开发者

how to set backroundcolor

开发者 https://www.devze.com 2022-12-09 18:02 出处:网络
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

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

精彩评论

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