<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FlexOut &#187; skinning</title>
	<atom:link href="http://flex.exposedout.net/tag/skinning/feed/" rel="self" type="application/rss+xml" />
	<link>http://flex.exposedout.net</link>
	<description>i am an itemrendrer in the making!</description>
	<lastBuildDate>Fri, 13 May 2011 10:05:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>How to Skin The Tabs in a TabNavigator Container</title>
		<link>http://flex.exposedout.net/2009/01/16/skin-tabnavigator-tab/</link>
		<comments>http://flex.exposedout.net/2009/01/16/skin-tabnavigator-tab/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 09:54:01 +0000</pubDate>
		<dc:creator>Vikram singh</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[skinning]]></category>
		<category><![CDATA[tabNavigator]]></category>

		<guid isPermaLink="false">http://guavus.wordpress.com/2009/01/16/how-to-skin-the-tabs-in-a-tabnavigator-container/</guid>
		<description><![CDATA[TabNavigator containers come with a handful of styles that allow you to customize the appearance of the tabs: tabStyleName Name of CSS style declaration that specifies styles for the tabs. The default value is undefined. firstTabStyleName Name of CSS style declaration that specifies styles for the first tab. If this is unspecified, the default value [...]


Related posts:<ol><li><a href='http://flex.exposedout.net/2008/10/05/search-datagrid-and-simple-datagrid-itemrenderer-example/' rel='bookmark' title='Permanent Link: Search dataGrid and Simple dataGrid Itemrenderer example'>Search dataGrid and Simple dataGrid Itemrenderer example</a></li>
<li><a href='http://flex.exposedout.net/2010/03/10/flex-component-lifecycle-and-event-flow-explained/' rel='bookmark' title='Permanent Link: Flex component lifecycle and event flow explained'>Flex component lifecycle and event flow explained</a></li>
<li><a href='http://flex.exposedout.net/2008/09/15/flex-component-lifecycle/' rel='bookmark' title='Permanent Link: Flex Component Lifecycle'>Flex Component Lifecycle</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>TabNavigator containers come with a handful of styles that allow you to customize the appearance of the tabs:</p>
<blockquote><p>    <strong>tabStyleName</strong><br />
    Name of CSS style declaration that specifies styles for the tabs. The default value is undefined.</p>
<p>    <strong>firstTabStyleName</strong><br />
    Name of CSS style declaration that specifies styles for the first tab. If this is unspecified, the default value of the tabStyleName style property is used.</p>
<p>    <strong>lastTabStyleName</strong><br />
    Name of CSS style declaration that specifies styles for the last tab. If this is unspecified, the default value of the tabStyleName style property is used.</p>
<p>    <strong>selectedTabTextStyleName</strong><br />
    Name of CSS style declaration that specifies styles for the text of the selected tab.</p></blockquote>
<p>But sadly, you cannot easily specify a CSS style declaration for the selected tab. You can only specify a style for the text of the selected tab. This sucks.</p>
<p>Luckily, there is a better way to customize the appearance of the tabs, without being constrained or limited by the styles mentioned above. You can skin them!. In the CSS for your application, create a new style declaration for your tabs. Then define values for any or all of the skin properties: skin, disabledSkin, downSkin, overSkin, upSkin, selectedDisabledSkin, selectedDownSkin, selectedOverSkin, selectedUpSkin.</p>
<p>Now this is where it gets beautiful. The values you specify for the skin properties can point to custom components OR embeddable assets! You can use ClassReference() to specify custom components and Embed() to specify custom assets like images or SWFs.What’s great about this solution is that you can also use the standard TabNavigator styles in tandem with the custom skins.</p>
<p>This means you can skin the tab backgrounds with a GradientCanvas container, for example, and use the tabStyleName and selectedTabTextStyleName styles to customize the tab fonts!</p>
<p>Update: I’ve posted sample code below that uses a Canvas container and some basic black-and-white styles to demonstrate how this works!</p>
<p><strong>Sample code for the custom styles:</strong></p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">.<span style="color: #0066CC;">tab</span><br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;up-skin: ClassReference<span style="color: #66cc66;">&#40;</span>”TabSkin”<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;down-skin: ClassReference<span style="color: #66cc66;">&#40;</span>”TabSkin”<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;over-skin: ClassReference<span style="color: #66cc66;">&#40;</span>”TabSkin”<span style="color: #66cc66;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp;selected-up-skin: ClassReference<span style="color: #66cc66;">&#40;</span>”SelectedTabSkin”<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;selected-down-skin: ClassReference<span style="color: #66cc66;">&#40;</span>”SelectedTabSkin”<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;selected-over-skin: ClassReference<span style="color: #66cc66;">&#40;</span>”SelectedTabSkin”<span style="color: #66cc66;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; &nbsp;background-<span style="color: #0066CC;">color</span>: <span style="color: #808080; font-style: italic;">#FFFFFF;</span><br />
<br />
&nbsp; &nbsp; &nbsp;font-weight: normal;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">color</span>: <span style="color: #808080; font-style: italic;">#000000;</span><br />
&nbsp; &nbsp; &nbsp;text-roll-over-<span style="color: #0066CC;">color</span>: <span style="color: #808080; font-style: italic;">#000000;</span><br />
<br />
&nbsp; &nbsp; &nbsp;corner-radius: <span style="color: #cc66cc;">0</span>;<br />
<br />
&nbsp; &nbsp; &nbsp;border-style: solid;<br />
&nbsp; &nbsp; &nbsp;border-thickness: <span style="color: #cc66cc;">1</span>;<br />
&nbsp; &nbsp; &nbsp;border-<span style="color: #0066CC;">color</span>: <span style="color: #808080; font-style: italic;">#000000;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
.<span style="color: #006600;">selectedTab</span><br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;background-<span style="color: #0066CC;">color</span>: <span style="color: #808080; font-style: italic;">#000000;</span><br />
<br />
&nbsp; &nbsp; &nbsp;font-weight: <span style="color: #0066CC;">bold</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">color</span>: <span style="color: #808080; font-style: italic;">#FFFFFF;</span><br />
&nbsp; &nbsp; &nbsp;text-roll-over-<span style="color: #0066CC;">color</span>: <span style="color: #808080; font-style: italic;">#FFFFFF;</span><br />
<br />
&nbsp; &nbsp; &nbsp;corner-radius: <span style="color: #cc66cc;">0</span>;<br />
<br />
&nbsp; &nbsp; &nbsp;border-style: solid;<br />
&nbsp; &nbsp; &nbsp;border-thickness: <span style="color: #cc66cc;">1</span>;<br />
&nbsp; &nbsp; &nbsp;border-<span style="color: #0066CC;">color</span>: <span style="color: #808080; font-style: italic;">#000000;</span><br />
<span style="color: #66cc66;">&#125;</span></div></td></tr></tbody></table></div>
<p><strong>Sample code for the tab skins:</strong></p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package<br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">containers</span>.<span style="color: #006600;">Canvas</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TabSkin <span style="color: #0066CC;">extends</span> Canvas<br />
&nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;override protected <span style="color: #000000; font-weight: bold;">function</span> updateDisplayList<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span>w : <span style="color: #0066CC;">Number</span>, h : <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">this</span>.<span style="color: #006600;">styleName</span> = “<span style="color: #0066CC;">tab</span>”;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">super</span>.<span style="color: #006600;">updateDisplayList</span> <span style="color: #66cc66;">&#40;</span>w, h<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></td></tr></tbody></table></div>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package<br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">containers</span>.<span style="color: #006600;">Canvas</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SelectedTabSkin <span style="color: #0066CC;">extends</span> Canvas<br />
&nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;override protected <span style="color: #000000; font-weight: bold;">function</span> updateDisplayList<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#40;</span>w : <span style="color: #0066CC;">Number</span>, h : <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">this</span>.<span style="color: #006600;">styleName</span> = “selectedTab”;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">super</span>.<span style="color: #006600;">updateDisplayList</span> <span style="color: #66cc66;">&#40;</span>w, h<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></td></tr></tbody></table></div>
<p><strong>Sample code for the TabNavigator container:</strong></p>
<blockquote><p>&lt;mx:TabNavigator id=&#8221;tabs&#8221;<br />
    tabStyleName=&#8221;tab&#8221; selectedTabTextStyleName=”selectedTab” /&gt;</p></blockquote>
<p>original post <a href="http://userflex.wordpress.com/2008/02/14/skin-tabnavigator-tabs/">here</a></p>


<p>Related posts:<ol><li><a href='http://flex.exposedout.net/2008/10/05/search-datagrid-and-simple-datagrid-itemrenderer-example/' rel='bookmark' title='Permanent Link: Search dataGrid and Simple dataGrid Itemrenderer example'>Search dataGrid and Simple dataGrid Itemrenderer example</a></li>
<li><a href='http://flex.exposedout.net/2010/03/10/flex-component-lifecycle-and-event-flow-explained/' rel='bookmark' title='Permanent Link: Flex component lifecycle and event flow explained'>Flex component lifecycle and event flow explained</a></li>
<li><a href='http://flex.exposedout.net/2008/09/15/flex-component-lifecycle/' rel='bookmark' title='Permanent Link: Flex Component Lifecycle'>Flex Component Lifecycle</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://flex.exposedout.net/2009/01/16/skin-tabnavigator-tab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

