Need help with TabNavigator style in Flex

I have tab navigation controls, and I would like to make all tabs a specific color, like blue ...

How can I do that?

I tried using the following CSS:


TabNavigator
{
    tabStyleName: "tabs";
}
.tabs {
    backgroundColor:#6588b9;
}

but it only works with the selected tab ...

Then I tried to do this programmatically:


for(var i:int=0; i<num_of_tabs; i++)
    tn.getTabAt(i).setStyle("backgroundColor","blue");

The same thing happens (only selected tabs show a blue background)

What can I do to make all tabs blue? Should I search for skinning?

Thank.

+3
source share
1 answer

I have a project with stylized tabs (I suppose you mean the tabs themselves, not the content). I'm sure there are other ways, but this is what I seem to be done with:

.myTabStyle {
    tabStyleName: "myTabs"
}
.myTabs {
    backgroundColor: #ff0000;
    fillColor: #000000;  /* this is the tab widget itself, not the content */
}
<mx:TabNavigator ... styleName="myTabStyle" .. >

Flex , CSS, , ( - TitleWindow).

, .

, "" Mac Windows, FireFox, IE, Safari, Flash 9 10 - , , , - , -. Flex 3 SDK ( Flex 2).

+3

All Articles