<?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 the Flex TabNavigator control</title>
	<atom:link href="http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sat, 11 Feb 2012 11:51:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: bechar kanjariya</title>
		<link>http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/comment-page-1/#comment-9563</link>
		<dc:creator>bechar kanjariya</dc:creator>
		<pubDate>Sun, 04 Sep 2011 05:36:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/#comment-9563</guid>
		<description>can we put checkbox in TabNavigator; if yes can anyone share the links.

Thanks in advance...

waiting for your reply.

Regards
-Bechar</description>
		<content:encoded><![CDATA[<p>can we put checkbox in TabNavigator; if yes can anyone share the links.</p>
<p>Thanks in advance&#8230;</p>
<p>waiting for your reply.</p>
<p>Regards<br />
-Bechar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pascal</title>
		<link>http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/comment-page-1/#comment-9190</link>
		<dc:creator>Pascal</dc:creator>
		<pubDate>Wed, 04 May 2011 06:34:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/#comment-9190</guid>
		<description>I&#039;m using Flex3 and I have a TabNavigator with 3 tabs (tab1, tab2, tab3). If a certain event is thrown, I want to change the colour (only the colour in the tab, not backgroundcolour) of tab3, regardless which tab is selected.
Any ideas how to do that?</description>
		<content:encoded><![CDATA[<p>I&#8217;m using Flex3 and I have a TabNavigator with 3 tabs (tab1, tab2, tab3). If a certain event is thrown, I want to change the colour (only the colour in the tab, not backgroundcolour) of tab3, regardless which tab is selected.<br />
Any ideas how to do that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hanya</title>
		<link>http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/comment-page-1/#comment-7621</link>
		<dc:creator>Hanya</dc:creator>
		<pubDate>Fri, 30 Apr 2010 23:37:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/#comment-7621</guid>
		<description>This code doesn&#039;t work in Flash Builder 4. I don&#039;t know why.  Perhaps problem between spark and halo? I&#039;m using spark theme. Please help me solve this problem.</description>
		<content:encoded><![CDATA[<p>This code doesn&#8217;t work in Flash Builder 4. I don&#8217;t know why.  Perhaps problem between spark and halo? I&#8217;m using spark theme. Please help me solve this problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/comment-page-1/#comment-7198</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Tue, 09 Mar 2010 06:22:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/#comment-7198</guid>
		<description>code for quiz using radio button and chaeck box .....</description>
		<content:encoded><![CDATA[<p>code for quiz using radio button and chaeck box &#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoffrey Hom</title>
		<link>http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/comment-page-1/#comment-6923</link>
		<dc:creator>Geoffrey Hom</dc:creator>
		<pubDate>Thu, 04 Feb 2010 18:35:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/#comment-6923</guid>
		<description>Very helpful post. I was looking for how to change the corner radius of the tabs in a TabNavigator. Thank you! --Geoff</description>
		<content:encoded><![CDATA[<p>Very helpful post. I was looking for how to change the corner radius of the tabs in a TabNavigator. Thank you! &#8211;Geoff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/comment-page-1/#comment-5840</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Tue, 22 Sep 2009 21:12:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/#comment-5840</guid>
		<description>To change the color of a &quot;not selected tab&quot;
&lt;pre lang=&quot;css&quot;&gt;
    TabNavigator {
       tabStyleName:myTabStyle;
    }
 
    .myTabStyle {
       fillColors: #006699, #cccc66;
       upSkin: ClassReference(&quot;CustomSkinClass&quot;);
       overSkin: ClassReference(&quot;CustomSkinClass&quot;);
       downSkin: ClassReference(&quot;CustomSkinClass&quot;);
    }
&lt;/pre&gt;

http://livedocs.adobe.com/flex/gumbo/langref/mx/containers/TabNavigator.html</description>
		<content:encoded><![CDATA[<p>To change the color of a &#8220;not selected tab&#8221;</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">    TabNavigator <span style="color: #00AA00;">&#123;</span>
       tabStyleName<span style="color: #00AA00;">:</span>myTabStyle<span style="color: #00AA00;">;</span>
    <span style="color: #00AA00;">&#125;</span>
&nbsp;
    <span style="color: #6666ff;">.myTabStyle</span> <span style="color: #00AA00;">&#123;</span>
       fillColors<span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#006699</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#cccc66</span><span style="color: #00AA00;">;</span>
       upSkin<span style="color: #00AA00;">:</span> ClassReference<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;CustomSkinClass&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
       overSkin<span style="color: #00AA00;">:</span> ClassReference<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;CustomSkinClass&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
       downSkin<span style="color: #00AA00;">:</span> ClassReference<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;CustomSkinClass&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
    <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><a href="http://livedocs.adobe.com/flex/gumbo/langref/mx/containers/TabNavigator.html" rel="nofollow">http://livedocs.adobe.com/flex/gumbo/langref/mx/containers/TabNavigator.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leonardo</title>
		<link>http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/comment-page-1/#comment-5529</link>
		<dc:creator>Leonardo</dc:creator>
		<pubDate>Tue, 01 Sep 2009 19:10:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/#comment-5529</guid>
		<description>Hey, I&#039;m trying to do something similar to your first example, but when you make click on any tab this tab change its height (higher) but the rest maintain the original size, can you please give me a hand on this? i&#039;ve tried everything!</description>
		<content:encoded><![CDATA[<p>Hey, I&#8217;m trying to do something similar to your first example, but when you make click on any tab this tab change its height (higher) but the rest maintain the original size, can you please give me a hand on this? i&#8217;ve tried everything!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deenalex</title>
		<link>http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/comment-page-1/#comment-1395</link>
		<dc:creator>deenalex</dc:creator>
		<pubDate>Mon, 10 Nov 2008 13:04:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/#comment-1395</guid>
		<description>Hi peter,

I have task to show bottom faced tab navigation, i mean opposite view of normal tab navigation. It depends on style of tab or i have to change codes in normal Tab navigation itself….?

Thanks in Advance….
deenalex</description>
		<content:encoded><![CDATA[<p>Hi peter,</p>
<p>I have task to show bottom faced tab navigation, i mean opposite view of normal tab navigation. It depends on style of tab or i have to change codes in normal Tab navigation itself….?</p>
<p>Thanks in Advance….<br />
deenalex</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Venkat from India</title>
		<link>http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/comment-page-1/#comment-1399</link>
		<dc:creator>Venkat from India</dc:creator>
		<pubDate>Thu, 30 Oct 2008 10:12:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/#comment-1399</guid>
		<description>I have tabs whose header text will be really long. Is there a way to increase the headers width accordingly. I am getting the text truncated right now.</description>
		<content:encoded><![CDATA[<p>I have tabs whose header text will be really long. Is there a way to increase the headers width accordingly. I am getting the text truncated right now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/comment-page-1/#comment-1398</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Tue, 09 Sep 2008 15:41:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/26/styling-the-flex-tabnavigator-control/#comment-1398</guid>
		<description>prashant,

This &quot;works&quot; but feels a bit hacky. The trick seems to be calling &lt;code&gt;&lt;em&gt;TabNavigator&lt;/em&gt;.getChildIndex()&lt;/code&gt; and getting an instance of the specific tab/button, then calling the &lt;code&gt;setStyle()&lt;/code&gt; method and setting the &lt;code&gt;fontStyle&lt;/code&gt; style to &quot;normal&quot; or &quot;italic&quot; depending on whether the tab is being enabled or disabled:
&lt;pre class=&quot;code&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.controls.Button;
            import mx.core.UIComponent;

            private function checkBox_change(evt:Event):void {
                var checkBox:CheckBox = evt.currentTarget as CheckBox;
                var tabNavChild:UIComponent = checkBox.data as UIComponent;
                tabNavChild.enabled = checkBox.selected;
                var idx:int = tabNav.getChildIndex(tabNavChild) as int;
                var tab:Button = tabNav.getTabAt(idx);
                var normalOrItalic:String = (checkBox.selected) ? &quot;normal&quot; : &quot;italic&quot;;
                tab.setStyle(&quot;fontStyle&quot;, normalOrItalic);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock=&quot;true&quot;&gt;
        &lt;mx:VBox&gt;
            &lt;mx:CheckBox id=&quot;checkBox1&quot;
                    label=&quot;Toggle ONE&quot;
                    selected=&quot;true&quot;
                    data=&quot;{vBox1}&quot;
                    change=&quot;checkBox_change(event);&quot; /&gt;
            &lt;mx:CheckBox id=&quot;checkBox2&quot;
                    label=&quot;Toggle TWO&quot;
                    selected=&quot;true&quot;
                    data=&quot;{vBox2}&quot;
                    change=&quot;checkBox_change(event);&quot; /&gt;
            &lt;mx:CheckBox id=&quot;checkBox3&quot;
                    label=&quot;Toggle THREE&quot;
                    selected=&quot;true&quot;
                    data=&quot;{vBox3}&quot;
                    change=&quot;checkBox_change(event);&quot; /&gt;
        &lt;/mx:VBox&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TabNavigator id=&quot;tabNav&quot; width=&quot;200&quot; height=&quot;100&quot;&gt;
        &lt;mx:VBox id=&quot;vBox1&quot; label=&quot;ONE&quot; /&gt;
        &lt;mx:VBox id=&quot;vBox2&quot; label=&quot;TWO&quot; /&gt;
        &lt;mx:VBox id=&quot;vBox3&quot; label=&quot;THREE&quot; /&gt;
    &lt;/mx:TabNavigator&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

Actually, looking at the problem again, this may be the better approach/solution. The following example listens for the &lt;code&gt;enabledChanged&lt;/code&gt; event on the TabNavigator container&#039;s VBox children and then toggles the &lt;code&gt;fontStyle&lt;/code&gt; style accordingly:
&lt;pre class=&quot;code&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        initialize=&quot;init();&quot;&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.controls.Button;

            private function init():void {
                vBox1.addEventListener(&quot;enabledChanged&quot;,
                            vBox_enabledChange);
                vBox2.addEventListener(&quot;enabledChanged&quot;,
                            vBox_enabledChange);
                vBox3.addEventListener(&quot;enabledChanged&quot;,
                            vBox_enabledChange);
            }

            private function vBox_enabledChange(evt:Event):void {
                var vBox:VBox = evt.currentTarget as VBox;
                var idx:int = tabNav.getChildIndex(vBox);
                var btn:Button = tabNav.getTabAt(idx) as Button;
                var normalOrItalic:String = (vBox.enabled) ? &quot;normal&quot; : &quot;italic&quot;;
                btn.setStyle(&quot;fontStyle&quot;, normalOrItalic);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock=&quot;true&quot;&gt;
        &lt;mx:VBox&gt;
            &lt;mx:CheckBox id=&quot;checkBox1&quot;
                    label=&quot;Toggle ONE&quot;
                    selected=&quot;true&quot; /&gt;
            &lt;mx:CheckBox id=&quot;checkBox2&quot;
                    label=&quot;Toggle TWO&quot;
                    selected=&quot;true&quot; /&gt;
            &lt;mx:CheckBox id=&quot;checkBox3&quot;
                    label=&quot;Toggle THREE&quot;
                    selected=&quot;true&quot;/&gt;
        &lt;/mx:VBox&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TabNavigator id=&quot;tabNav&quot; width=&quot;200&quot; height=&quot;100&quot;&gt;
        &lt;mx:VBox id=&quot;vBox1&quot;
                label=&quot;ONE&quot;
                enabled=&quot;{checkBox1.selected}&quot; /&gt;
        &lt;mx:VBox id=&quot;vBox2&quot;
                label=&quot;TWO&quot;
                enabled=&quot;{checkBox2.selected}&quot; /&gt;
        &lt;mx:VBox id=&quot;vBox3&quot;
                label=&quot;THREE&quot;
                enabled=&quot;{checkBox3.selected}&quot; /&gt;
    &lt;/mx:TabNavigator&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

Hope that helps,

Peter</description>
		<content:encoded><![CDATA[<p>prashant,</p>
<p>This &#8220;works&#8221; but feels a bit hacky. The trick seems to be calling <code><em>TabNavigator</em>.getChildIndex()</code> and getting an instance of the specific tab/button, then calling the <code>setStyle()</code> method and setting the <code>fontStyle</code> style to &#8220;normal&#8221; or &#8220;italic&#8221; depending on whether the tab is being enabled or disabled:</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.controls.Button;
            import mx.core.UIComponent;

            private function checkBox_change(evt:Event):void {
                var checkBox:CheckBox = evt.currentTarget as CheckBox;
                var tabNavChild:UIComponent = checkBox.data as UIComponent;
                tabNavChild.enabled = checkBox.selected;
                var idx:int = tabNav.getChildIndex(tabNavChild) as int;
                var tab:Button = tabNav.getTabAt(idx);
                var normalOrItalic:String = (checkBox.selected) ? "normal" : "italic";
                tab.setStyle("fontStyle", normalOrItalic);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:VBox&gt;
            &lt;mx:CheckBox id="checkBox1"
                    label="Toggle ONE"
                    selected="true"
                    data="{vBox1}"
                    change="checkBox_change(event);" /&gt;
            &lt;mx:CheckBox id="checkBox2"
                    label="Toggle TWO"
                    selected="true"
                    data="{vBox2}"
                    change="checkBox_change(event);" /&gt;
            &lt;mx:CheckBox id="checkBox3"
                    label="Toggle THREE"
                    selected="true"
                    data="{vBox3}"
                    change="checkBox_change(event);" /&gt;
        &lt;/mx:VBox&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TabNavigator id="tabNav" width="200" height="100"&gt;
        &lt;mx:VBox id="vBox1" label="ONE" /&gt;
        &lt;mx:VBox id="vBox2" label="TWO" /&gt;
        &lt;mx:VBox id="vBox3" label="THREE" /&gt;
    &lt;/mx:TabNavigator&gt;

&lt;/mx:Application&gt;
</pre>
<p>Actually, looking at the problem again, this may be the better approach/solution. The following example listens for the <code>enabledChanged</code> event on the TabNavigator container&#8217;s VBox children and then toggles the <code>fontStyle</code> style accordingly:</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        initialize="init();"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.controls.Button;

            private function init():void {
                vBox1.addEventListener("enabledChanged",
                            vBox_enabledChange);
                vBox2.addEventListener("enabledChanged",
                            vBox_enabledChange);
                vBox3.addEventListener("enabledChanged",
                            vBox_enabledChange);
            }

            private function vBox_enabledChange(evt:Event):void {
                var vBox:VBox = evt.currentTarget as VBox;
                var idx:int = tabNav.getChildIndex(vBox);
                var btn:Button = tabNav.getTabAt(idx) as Button;
                var normalOrItalic:String = (vBox.enabled) ? "normal" : "italic";
                btn.setStyle("fontStyle", normalOrItalic);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:VBox&gt;
            &lt;mx:CheckBox id="checkBox1"
                    label="Toggle ONE"
                    selected="true" /&gt;
            &lt;mx:CheckBox id="checkBox2"
                    label="Toggle TWO"
                    selected="true" /&gt;
            &lt;mx:CheckBox id="checkBox3"
                    label="Toggle THREE"
                    selected="true"/&gt;
        &lt;/mx:VBox&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TabNavigator id="tabNav" width="200" height="100"&gt;
        &lt;mx:VBox id="vBox1"
                label="ONE"
                enabled="{checkBox1.selected}" /&gt;
        &lt;mx:VBox id="vBox2"
                label="TWO"
                enabled="{checkBox2.selected}" /&gt;
        &lt;mx:VBox id="vBox3"
                label="THREE"
                enabled="{checkBox3.selected}" /&gt;
    &lt;/mx:TabNavigator&gt;

&lt;/mx:Application&gt;
</pre>
<p>Hope that helps,</p>
<p>Peter</p>
]]></content:encoded>
	</item>
</channel>
</rss>

