spark TabBarコントロール(Flex4)で選択したタブの背景色を変更したいと思います。私たちは、次のコードを使用する可能性がありFlex3ティルFLEX 4でTabBarで選択したTABのスタイルを動的に変更
は、BT(デザインモードで)4.
<fx:Script>
<![CDATA[
protected function tabbedPanel_clickHandler(event:MouseEvent):void
{
var tab:Tab = Tab(tabbedPanel.getChildAt(1));
tab.setStyle("fillColors", ["red", "white"]);
tab.setStyle("fillAlphas", [1.0, 1.0]);
tab.setStyle("backgroundColor", "red");
}
]]>
</fx:Script>
<s:TabBar id="tabbedPanel" direction="ltr" x="10" y="20" height="22" cornerRadius="5" dataProvider="{viewStack}" click="tabbedPanel_clickHandler(event)" />