<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Styling individual tabs in a TabBar control</title>
	<atom:link href="http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 14:19:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dudda</title>
		<link>http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/comment-page-1/#comment-10226</link>
		<dc:creator>Dudda</dc:creator>
		<pubDate>Wed, 07 Dec 2011 15:45:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/#comment-10226</guid>
		<description>half of my post has been cut off....
i&#039;ll try again (a preview would be great....)

Found a sort of solution finally:
if you have:
&lt;pre&gt;

	
	


&lt;/pre&gt;
and the following AS code:
&lt;pre&gt;
protected function click_but2(event:MouseEvent):void
{
	var box:NavigatorContent = new NavigatorContent;
	box.label = &quot;Child &quot; + navigator.numChildren;
	box.addEventListener(FlexEvent.CREATION_COMPLETE,tabCreationComplete);
	navigator.addChild(box);
}

private function tabCreationComplete(event:FlexEvent):void{
	navigator.getTabAt(navigator.numChildren -1).styleName=&quot;myTabCSSSelector&quot;;
}
&lt;/pre&gt;
and the following style section
&lt;pre&gt;

	@namespace s &quot;library://ns.adobe.com/flex/spark&quot;;
	@namespace mx &quot;library://ns.adobe.com/flex/mx&quot;;
	.myTabCSSSelector{
		color:Yellow;
		chromeColor:Navy;
	}

&lt;/pre&gt;
this works BUT, if you click a second time the button the previuously created tab reverts its styleName property to the default &quot;ButtonBarButton&quot; value.
Debugging a bit deeper it seems that after the creation complete of the new tab and after the addChild method there is a re-drawing of the &quot;hidden&quot; tabBar of the TabNavigator which reverts every tab to its default.....
If some tester (better then me) can find out which is the problem maybe we could find a solution.
Thanks</description>
		<content:encoded><![CDATA[<p>half of my post has been cut off&#8230;.<br />
i&#8217;ll try again (a preview would be great&#8230;.)</p>
<p>Found a sort of solution finally:<br />
if you have:</p>
<pre>
</pre>
<p>and the following AS code:</p>
<pre>
protected function click_but2(event:MouseEvent):void
{
	var box:NavigatorContent = new NavigatorContent;
	box.label = "Child " + navigator.numChildren;
	box.addEventListener(FlexEvent.CREATION_COMPLETE,tabCreationComplete);
	navigator.addChild(box);
}

private function tabCreationComplete(event:FlexEvent):void{
	navigator.getTabAt(navigator.numChildren -1).styleName="myTabCSSSelector";
}
</pre>
<p>and the following style section</p>
<pre>

	@namespace s "library://ns.adobe.com/flex/spark";
	@namespace mx "library://ns.adobe.com/flex/mx";
	.myTabCSSSelector{
		color:Yellow;
		chromeColor:Navy;
	}
</pre>
<p>this works BUT, if you click a second time the button the previuously created tab reverts its styleName property to the default &#8220;ButtonBarButton&#8221; value.<br />
Debugging a bit deeper it seems that after the creation complete of the new tab and after the addChild method there is a re-drawing of the &#8220;hidden&#8221; tabBar of the TabNavigator which reverts every tab to its default&#8230;..<br />
If some tester (better then me) can find out which is the problem maybe we could find a solution.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dudda</title>
		<link>http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/comment-page-1/#comment-10225</link>
		<dc:creator>Dudda</dc:creator>
		<pubDate>Wed, 07 Dec 2011 15:42:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/#comment-10225</guid>
		<description>Found a sort of solution finally:
if you have:
&lt;code&gt;

	
	


&lt;/code&gt;
and the following AS code:
&lt;code&gt;
protected function click_but2(event:MouseEvent):void
{
	var box:NavigatorContent = new NavigatorContent;
	box.label = &quot;Child &quot; + navigator.numChildren;
	box.addEventListener(FlexEvent.CREATION_COMPLETE,tabCreationComplete);
	navigator.addChild(box);
}

private function tabCreationComplete(event:FlexEvent):void{
	navigator.getTabAt(navigator.numChildren -1).styleName=&quot;myTabCSSSelector&quot;;
}
&lt;/code&gt;
and the following style section
&lt;code&gt;

	@namespace s &quot;library://ns.adobe.com/flex/spark&quot;;
	@namespace mx &quot;library://ns.adobe.com/flex/mx&quot;;
	.myTabCSSSelector{
		color:Yellow;
		chromeColor:Navy;
	}

&lt;/code&gt;
this works BUT, if you click a second time the button the previuously created tab reverts its styleName property to the default &quot;ButtonBarButton&quot; value.
Debugging a bit deeper it seems that after the creation complete of the new tab and after the addChild method there is a re-drawing of the &quot;hidden&quot; tabBar of the TabNavigator which reverts every tab to its default.....
If some tester (better then me) can find out which is the problem maybe we could find a solution.
Thanks</description>
		<content:encoded><![CDATA[<p>Found a sort of solution finally:<br />
if you have:<br />
<code></p>
<p></code><br />
and the following AS code:<br />
<code><br />
protected function click_but2(event:MouseEvent):void<br />
{<br />
	var box:NavigatorContent = new NavigatorContent;<br />
	box.label = "Child " + navigator.numChildren;<br />
	box.addEventListener(FlexEvent.CREATION_COMPLETE,tabCreationComplete);<br />
	navigator.addChild(box);<br />
}</p>
<p>private function tabCreationComplete(event:FlexEvent):void{<br />
	navigator.getTabAt(navigator.numChildren -1).styleName="myTabCSSSelector";<br />
}<br />
</code><br />
and the following style section<br />
<code></p>
<p>	@namespace s "library://ns.adobe.com/flex/spark";<br />
	@namespace mx "library://ns.adobe.com/flex/mx";<br />
	.myTabCSSSelector{<br />
		color:Yellow;<br />
		chromeColor:Navy;<br />
	}</p>
<p></code><br />
this works BUT, if you click a second time the button the previuously created tab reverts its styleName property to the default &#8220;ButtonBarButton&#8221; value.<br />
Debugging a bit deeper it seems that after the creation complete of the new tab and after the addChild method there is a re-drawing of the &#8220;hidden&#8221; tabBar of the TabNavigator which reverts every tab to its default&#8230;..<br />
If some tester (better then me) can find out which is the problem maybe we could find a solution.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dudda</title>
		<link>http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/comment-page-1/#comment-10221</link>
		<dc:creator>Dudda</dc:creator>
		<pubDate>Tue, 06 Dec 2011 15:28:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/#comment-10221</guid>
		<description>same problem for me, any ideas? i&#039;ve googled for a week now.... the only solutions are similar to this, but nothing about TabNavigator and tabBar, the Flash Builder 4.5 even doesn&#039;t list mx.controls.tabBarClasses.Tab among context help... 
Really Thanks in advance.</description>
		<content:encoded><![CDATA[<p>same problem for me, any ideas? i&#8217;ve googled for a week now&#8230;. the only solutions are similar to this, but nothing about TabNavigator and tabBar, the Flash Builder 4.5 even doesn&#8217;t list mx.controls.tabBarClasses.Tab among context help&#8230;<br />
Really Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shawn</title>
		<link>http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/comment-page-1/#comment-9401</link>
		<dc:creator>Shawn</dc:creator>
		<pubDate>Mon, 18 Jul 2011 03:58:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/#comment-9401</guid>
		<description>Is there a way to set individual tab colors with the Spark TabBar ?   The getChildAt(idx) returns a skin in the Spark TabBar.</description>
		<content:encoded><![CDATA[<p>Is there a way to set individual tab colors with the Spark TabBar ?   The getChildAt(idx) returns a skin in the Spark TabBar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Horyna</title>
		<link>http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/comment-page-1/#comment-8489</link>
		<dc:creator>Horyna</dc:creator>
		<pubDate>Tue, 26 Oct 2010 20:12:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/#comment-8489</guid>
		<description>Yee, the code with chromoColor is working, but: its only make one color, not the nice color transition. Tested as: tab.setStyle(&quot;chromeColor&quot;, [color, &quot;white&quot;]);  ...how to correct this?</description>
		<content:encoded><![CDATA[<p>Yee, the code with chromoColor is working, but: its only make one color, not the nice color transition. Tested as: tab.setStyle(&#8220;chromeColor&#8221;, [color, "white"]);  &#8230;how to correct this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/comment-page-1/#comment-8363</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Tue, 28 Sep 2010 03:48:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/#comment-8363</guid>
		<description>@Richard,

Try something like this instead:
&lt;pre lang=&quot;mxml&quot;&gt;

&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;s:Application name=&quot;TabBar_getChildAt_test&quot;
        xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot; 
        xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot; 
        xmlns:mx=&quot;library://ns.adobe.com/flex/mx&quot;&gt;
    &lt;s:layout&gt;
        &lt;s:VerticalLayout horizontalAlign=&quot;center&quot; verticalAlign=&quot;middle&quot; /&gt;
    &lt;/s:layout&gt;
    
    &lt;fx:Script&gt;
        &lt;![CDATA[
            import mx.events.ItemClickEvent;
            import mx.controls.tabBarClasses.Tab;
            
            private function tabBar_creationComplete():void {
                const colorArr:Array = [&quot;red&quot;, &quot;haloOrange&quot;, &quot;yellow&quot;, &quot;haloGreen&quot;, &quot;haloBlue&quot;];
                var color:String;
                var tab:Tab;
                var idx:uint;
                const len:uint = tabBar.dataProvider.length;
                
                for (idx = 0; idx &lt; len; idx++) {
                    var i:int = idx % colorArr.length;
                    color = colorArr[i];
                    tab = Tab(tabBar.getChildAt(idx));
                    tab.setStyle(&quot;chromeColor&quot;, color);
                }
            }
            
            private function tabBar_itemClick(evt:ItemClickEvent):void {
                viewStack.selectedIndex = evt.index;
            }
        ]]&gt;
    &lt;/fx:Script&gt;
    
    &lt;mx:TabBar id=&quot;tabBar&quot;
            creationComplete=&quot;tabBar_creationComplete();&quot;
            itemClick=&quot;tabBar_itemClick(event);&quot;&gt;
        &lt;mx:dataProvider&gt;
            &lt;fx:Array id=&quot;arr&quot;&gt;
                &lt;fx:Object label=&quot;Red&quot; /&gt;
                &lt;fx:Object label=&quot;Orange&quot; /&gt;
                &lt;fx:Object label=&quot;Yellow&quot; /&gt;
                &lt;fx:Object label=&quot;Green&quot; /&gt;
                &lt;fx:Object label=&quot;Blue&quot; /&gt;
            &lt;/fx:Array&gt;
        &lt;/mx:dataProvider&gt;
    &lt;/mx:TabBar&gt;
    
    &lt;mx:ViewStack id=&quot;viewStack&quot;
            width=&quot;{tabBar.width}&quot;
            styleName=&quot;plain&quot;&gt;
        &lt;mx:VBox id=&quot;redVBox&quot; width=&quot;100%&quot; height=&quot;100&quot;&gt;
            &lt;mx:Label text=&quot;Red VBox&quot; /&gt;
        &lt;/mx:VBox&gt;
        &lt;mx:VBox id=&quot;orangeVBox&quot; width=&quot;100%&quot; height=&quot;100&quot;&gt;
            &lt;mx:Label text=&quot;Orange VBox&quot; /&gt;
        &lt;/mx:VBox&gt;
        &lt;mx:VBox id=&quot;yellowVBox&quot; width=&quot;100%&quot; height=&quot;100&quot;&gt;
            &lt;mx:Label text=&quot;Yellow VBox&quot; /&gt;
        &lt;/mx:VBox&gt;
        &lt;mx:VBox id=&quot;greenVBox&quot; width=&quot;100%&quot; height=&quot;100&quot;&gt;
            &lt;mx:Label text=&quot;Green VBox&quot; /&gt;
        &lt;/mx:VBox&gt;
        &lt;mx:VBox id=&quot;blueVBox&quot; width=&quot;100%&quot; height=&quot;100&quot;&gt;
            &lt;mx:Label text=&quot;Blue VBox&quot; /&gt;
        &lt;/mx:VBox&gt;
    &lt;/mx:ViewStack&gt;
    
&lt;/s:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>@Richard,</p>
<p>Try something like this instead:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;">&nbsp;
<span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;TabBar_getChildAt_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VerticalLayout</span> horizontalAlign=<span style="color: #ff0000;">&quot;center&quot;</span> verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
<span style="color: #000000;">            import mx.events.ItemClickEvent;</span>
<span style="color: #000000;">            import mx.controls.tabBarClasses.Tab;</span>
&nbsp;
<span style="color: #000000;">            private function tabBar_creationComplete<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                const colorArr:Array = <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;red&quot;</span>, <span style="color: #ff0000;">&quot;haloOrange&quot;</span>, <span style="color: #ff0000;">&quot;yellow&quot;</span>, <span style="color: #ff0000;">&quot;haloGreen&quot;</span>, <span style="color: #ff0000;">&quot;haloBlue&quot;</span><span style="color: #66cc66;">&#93;</span>;</span>
<span style="color: #000000;">                var color:String;</span>
<span style="color: #000000;">                var tab:Tab;</span>
<span style="color: #000000;">                var idx:uint;</span>
<span style="color: #000000;">                const len:uint = tabBar.dataProvider.length;</span>
&nbsp;
<span style="color: #000000;">                for <span style="color: #66cc66;">&#40;</span>idx = <span style="color: #cc66cc;">0</span>; idx &lt; len; idx++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                    var i:int = idx % colorArr.length;</span>
<span style="color: #000000;">                    color = colorArr<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;</span>
<span style="color: #000000;">                    tab = Tab<span style="color: #66cc66;">&#40;</span>tabBar.getChildAt<span style="color: #66cc66;">&#40;</span>idx<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                    tab.setStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;chromeColor&quot;</span>, color<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">            private function tabBar_itemClick<span style="color: #66cc66;">&#40;</span>evt:ItemClickEvent<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                viewStack.selectedIndex = evt.index;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:TabBar</span> id=<span style="color: #ff0000;">&quot;tabBar&quot;</span></span>
<span style="color: #000000;">            creationComplete=<span style="color: #ff0000;">&quot;tabBar_creationComplete();&quot;</span></span>
<span style="color: #000000;">            itemClick=<span style="color: #ff0000;">&quot;tabBar_itemClick(event);&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Array</span> id=<span style="color: #ff0000;">&quot;arr&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Red&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Orange&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Yellow&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Green&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> label=<span style="color: #ff0000;">&quot;Blue&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Array</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:TabBar</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ViewStack</span> id=<span style="color: #ff0000;">&quot;viewStack&quot;</span></span>
<span style="color: #000000;">            width=<span style="color: #ff0000;">&quot;{tabBar.width}&quot;</span></span>
<span style="color: #000000;">            styleName=<span style="color: #ff0000;">&quot;plain&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:VBox</span> id=<span style="color: #ff0000;">&quot;redVBox&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> text=<span style="color: #ff0000;">&quot;Red VBox&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:VBox</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:VBox</span> id=<span style="color: #ff0000;">&quot;orangeVBox&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> text=<span style="color: #ff0000;">&quot;Orange VBox&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:VBox</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:VBox</span> id=<span style="color: #ff0000;">&quot;yellowVBox&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> text=<span style="color: #ff0000;">&quot;Yellow VBox&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:VBox</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:VBox</span> id=<span style="color: #ff0000;">&quot;greenVBox&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> text=<span style="color: #ff0000;">&quot;Green VBox&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:VBox</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:VBox</span> id=<span style="color: #ff0000;">&quot;blueVBox&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> text=<span style="color: #ff0000;">&quot;Blue VBox&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:VBox</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ViewStack</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/comment-page-1/#comment-8362</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Tue, 28 Sep 2010 00:59:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/#comment-8362</guid>
		<description>This example works in this page, but when I run it in Flashbuilder 4, it does not work. I get the tabs but no color.</description>
		<content:encoded><![CDATA[<p>This example works in this page, but when I run it in Flashbuilder 4, it does not work. I get the tabs but no color.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Van den Eynde</title>
		<link>http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/comment-page-1/#comment-7607</link>
		<dc:creator>Tom Van den Eynde</dc:creator>
		<pubDate>Thu, 29 Apr 2010 10:48:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/#comment-7607</guid>
		<description>In this example the tabs are already instantiated when calling tabBar.getChildAt(idx). However when adding tab pages dynamically the getChildAt often causes an error because the tabs haven&#039;t been set up yet. This makes it rather problematic to set properties (visible...) or styles.</description>
		<content:encoded><![CDATA[<p>In this example the tabs are already instantiated when calling tabBar.getChildAt(idx). However when adding tab pages dynamically the getChildAt often causes an error because the tabs haven&#8217;t been set up yet. This makes it rather problematic to set properties (visible&#8230;) or styles.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/comment-page-1/#comment-7368</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Sat, 27 Mar 2010 03:26:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/#comment-7368</guid>
		<description>@Shannara,

If you want to use the same text color for each tab you can set the &lt;code&gt;color&lt;/code&gt; style in the MXML directly, as seen in the following snippet:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;mx:TabBar id=&quot;tabBar&quot;
        dataProvider=&quot;{arr}&quot;
        color=&quot;white&quot;
        creationComplete=&quot;tabBar_creationComplete();&quot;
        itemClick=&quot;tabBar_itemClick(event);&quot; /&gt;
&lt;/pre&gt;

Or if you want a separate text colors for each tab you can set the &lt;code&gt;color&lt;/code&gt; style using ActionScript, as seen in the following example:
&lt;pre lang=&quot;actionscript3&quot;&gt;
tab.setStyle(&quot;color&quot;, Math.random() * 0xFFFFFF);
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>@Shannara,</p>
<p>If you want to use the same text color for each tab you can set the <code>color</code> style in the MXML directly, as seen in the following snippet:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:TabBar</span> id=<span style="color: #ff0000;">&quot;tabBar&quot;</span></span>
<span style="color: #000000;">        dataProvider=<span style="color: #ff0000;">&quot;{arr}&quot;</span></span>
<span style="color: #000000;">        color=<span style="color: #ff0000;">&quot;white&quot;</span></span>
<span style="color: #000000;">        creationComplete=<span style="color: #ff0000;">&quot;tabBar_creationComplete();&quot;</span></span>
<span style="color: #000000;">        itemClick=<span style="color: #ff0000;">&quot;tabBar_itemClick(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span></pre></div></div>

<p>Or if you want a separate text colors for each tab you can set the <code>color</code> style using ActionScript, as seen in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">tab<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">setStyle</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;color&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> 0xFFFFFF<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shannara</title>
		<link>http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/comment-page-1/#comment-7367</link>
		<dc:creator>Shannara</dc:creator>
		<pubDate>Fri, 26 Mar 2010 21:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/19/styling-individual-tabs-in-a-tabbar-control/#comment-7367</guid>
		<description>How do we change the color of the text on the tab itself? I see stuff for the body of a tab, but not the tab header ...</description>
		<content:encoded><![CDATA[<p>How do we change the color of the text on the tab itself? I see stuff for the body of a tab, but not the tab header &#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

