<?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>The Morphic Group &#187; list</title>
	<atom:link href="http://www.themorphicgroup.com/blog/tag/list/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.themorphicgroup.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 22 Feb 2010 18:20:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Example of Feature Rich Item Renderers in Flex 4</title>
		<link>http://www.themorphicgroup.com/blog/2009/10/15/example-of-feature-rich-item-renderers-in-flex-4/</link>
		<comments>http://www.themorphicgroup.com/blog/2009/10/15/example-of-feature-rich-item-renderers-in-flex-4/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 15:27:15 +0000</pubDate>
		<dc:creator>Seth</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[flex4]]></category>
		<category><![CDATA[itemrenderer]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[Spark]]></category>

		<guid isPermaLink="false">http://www.themorphicgroup.com/blog/?p=306</guid>
		<description><![CDATA[This is an example of creating feature rich item renderers in Flex 4. The example retrieves this blog's RSS feed and displays each entry in a Spark List using Item Renderers. This example will demonstrate: Skinning an item renderer and list States in an item renderer Pass callback function to item renderer Override ItemRenderer 'set [...]]]></description>
			<content:encoded><![CDATA[<p>
This is an example of creating feature rich item renderers in Flex 4. The example retrieves this blog's RSS feed and displays each entry in a Spark List using Item Renderers. This example will demonstrate:</p>
<ul style="list-style:square">
<li>Skinning an item renderer and list</li>
<li>States in an item renderer</li>
<li>Pass callback function to item renderer</li>
<li>Override ItemRenderer 'set data'  as a known ValueObject</li>
<li>Swap icons/images based on data values</li>
</ul>
<p>
	<a href="http://www.themorphicgroup.com/examples/Flex4ItemRenderer01/Flex4ItemRenderer01.html" target="_blank"><img src="http://www.themorphicgroup.com/blog/wp-content/uploads/2009/10/itemrenderer_flex4_01_post.png" width="444" height="175" border="none" alt="" /></a><br />
	<br />
	&nbsp;<a href="http://www.themorphicgroup.com/examples/Flex4ItemRenderer01/Flex4ItemRenderer01.html" target="_blank"><strong>View the Example</strong> with source view enabled</a>
</p>
<p>	This blog post will cover the main points of the example but not the entire code, so view the example's source view to see all the code in full.</p>
<h3>Getting Blog Entries From RSS</h3>
<p>
	I won't go into too much detail about how the data is retrieved, view the source for all the details. The RSSService class makes a request to this blog's RSS url. That XML responce is turned into an ArrayCollection of BlogEntryVO value objects. The result ArrayCollection is set as the data provider for the Spark List.
</p>
<h3>Skinning the Spark List</h3>
<p>
	<strong>Spark List:</strong><br />
	The first step in skinning the Spark List is to define the 'skinClass':
</p>
<pre class="actionscript3" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>List id=<span style="color: #990000;">&quot;blogList&quot;</span>
	skinClass=<span style="color: #990000;">&quot;com.themorphicgroup.skins.list.ListSkin&quot;</span>
	<span style="color: #004993;">change</span>=<span style="color: #990000;">&quot;blogList_selectionHandler(event)&quot;</span>
	caretChange=<span style="color: #990000;">&quot;blogList_selectionHandler(event)&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
&nbsp;</pre>
<p>
	<strong>Skinning Spark List:</strong><br />
	Lets look at the 'com.themorphicgroup.skins.list.ListSkin' List skin class. The most important parts of this skin is the 'Scroller' and 'DataGroup' it surrounds.<br />
	The DataGroup is a simple container class in Flex 4 for holding data items and item renderers. The Scroller enables the DataGroup items to be scrolled. Full List skin code:
</p>
<pre class="actionscript3" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?</span>xml <span style="color: #004993;">version</span>=<span style="color: #990000;">&quot;1.0&quot;</span> encoding=<span style="color: #990000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>SparkSkin xmlns<span style="color: #000000; font-weight: bold;">:</span>fx=<span style="color: #990000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span>
			 xmlns<span style="color: #000000; font-weight: bold;">:</span>s=<span style="color: #990000;">&quot;library://ns.adobe.com/flex/spark&quot;</span>
			 xmlns<span style="color: #000000; font-weight: bold;">:</span>mx=<span style="color: #990000;">&quot;library://ns.adobe.com/flex/halo&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;</span>fx<span style="color: #000000; font-weight: bold;">:</span>Metadata<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000;">&#91;</span>HostComponent<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;spark.components.List&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
	<span style="color: #000000; font-weight: bold;">&lt;/</span>fx<span style="color: #000000; font-weight: bold;">:</span>Metadata<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>states<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>State <span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;normal&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>State <span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;over&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;/</span>s<span style="color: #000000; font-weight: bold;">:</span>states<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;!--</span> <span style="color: #004993;">background</span> <span style="color: #000000; font-weight: bold;">--&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>Rect <span style="color: #004993;">top</span>=<span style="color: #990000;">&quot;0&quot;</span> <span style="color: #004993;">right</span>=<span style="color: #990000;">&quot;0&quot;</span> <span style="color: #004993;">bottom</span>=<span style="color: #990000;">&quot;0&quot;</span> <span style="color: #004993;">left</span>=<span style="color: #990000;">&quot;0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>stroke<span style="color: #000000; font-weight: bold;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>SolidColorStroke <span style="color: #004993;">color</span>=<span style="color: #990000;">&quot;0x999999&quot;</span> weight=<span style="color: #990000;">&quot;2&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/</span>s<span style="color: #000000; font-weight: bold;">:</span>stroke<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>fill<span style="color: #000000; font-weight: bold;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>SolidColor <span style="color: #004993;">color</span>=<span style="color: #990000;">&quot;0xffffff&quot;</span> <span style="color: #004993;">color</span>.over=<span style="color: #990000;">&quot;0xf8f8f8&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/</span>s<span style="color: #000000; font-weight: bold;">:</span>fill<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;/</span>s<span style="color: #000000; font-weight: bold;">:</span>Rect<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;!--</span> scroller <span style="color: #000000; font-weight: bold;">--&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>Scroller id=<span style="color: #990000;">&quot;scroller&quot;</span>
				<span style="color: #004993;">left</span>=<span style="color: #990000;">&quot;0&quot;</span>
				<span style="color: #004993;">top</span>=<span style="color: #990000;">&quot;0&quot;</span>
				<span style="color: #004993;">right</span>=<span style="color: #990000;">&quot;0&quot;</span>
				<span style="color: #004993;">bottom</span>=<span style="color: #990000;">&quot;0&quot;</span>
				horizontalScrollPolicy=<span style="color: #990000;">&quot;off&quot;</span>
				minViewportInset=<span style="color: #990000;">&quot;1&quot;</span>
				focusEnabled=<span style="color: #990000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">&lt;!--</span> container <span style="color: #0033ff; font-weight: bold;">for</span> data<span style="color: #000000; font-weight: bold;">--&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>DataGroup id=<span style="color: #990000;">&quot;dataGroup&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>layout<span style="color: #000000; font-weight: bold;">&gt;</span>
				<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>VerticalLayout gap=<span style="color: #990000;">&quot;0&quot;</span> horizontalAlign=<span style="color: #990000;">&quot;contentJustify&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;/</span>s<span style="color: #000000; font-weight: bold;">:</span>layout<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/</span>s<span style="color: #000000; font-weight: bold;">:</span>DataGroup<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;/</span>s<span style="color: #000000; font-weight: bold;">:</span>Scroller<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;/</span>s<span style="color: #000000; font-weight: bold;">:</span>SparkSkin<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;</pre>
<p>
	<strong>Skinning Spark List and global vertical scrollers:</strong><br />
	The last thing we will look at in skinning the List is the skin for the Scroller (VScroll). The skin classes for the scroller are in com.themorphicgroup.skins.scroller.vertical<br />
	To define the 'VerticalScrollbar' Skin to all Spark VScrollBar we do that in the css file:
</p>
<pre class="actionscript3" style="font-family:monospace;">&nbsp;
s<span style="color: #000000; font-weight: bold;">|</span>VScrollBar <span style="color: #000000;">&#123;</span>
	skinClass<span style="color: #000000; font-weight: bold;">:</span> ClassReference<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;com.themorphicgroup.skins.scroller.vertical.VerticalScrollbar&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;</pre>
<h3>Define an ItemRenderer for the Spark List</h3>
<p>
	In creationComplete we will create the item renderer for the Spark List, we will also define any needed properties.<br />
	In this case we want to pass in a callback funtion for when the delete icon is clicked in an item renderer.
</p>
<pre class="actionscript3" style="font-family:monospace;">&nbsp;
<span style="color: #009900;">//create itemrenderer</span>
<span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> application_creationCompleteHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span>FlexEvent<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #009900;">//create itemrenderer</span>
	blogListItemRenderer = <span style="color: #0033ff; font-weight: bold;">new</span> ClassFactory<span style="color: #000000;">&#40;</span>BlogEntryItemRenderer<span style="color: #000000;">&#41;</span>;
	<span style="color: #009900;">//define properties (callback for item delete)</span>
	blogListItemRenderer.properties = <span style="color: #000000;">&#123;</span>deleteHandlerFunction<span style="color: #000000; font-weight: bold;">:</span>itemDeleteClick_handler<span style="color: #000000;">&#125;</span>;
	<span style="color: #009900;">//set itemrenderer to List</span>
	blogList.itemRenderer = blogListItemRenderer;
	.... <span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #009900;">//callback function for delete click</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> itemDeleteClick_handler<span style="color: #000000;">&#40;</span>blogEntryItem<span style="color: #000000; font-weight: bold;">:</span>BlogEntryVO<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	...
&nbsp;</pre>
<p>
Inside the Item Renderer when the delete icon is clicked the callback function is passed the current item renderer's data (a value object):
</p>
<pre class="actionscript3" style="font-family:monospace;">&nbsp;
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> deleteHandlerFunction<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=function%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:function.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Function</span></a>;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> trash_btn_clickHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #009900;">//callback function pass BlogEntryVO value object</span>
	deleteHandlerFunction<span style="color: #000000;">&#40;</span>blogEntry<span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;</pre>
<h3>The ItemRenderer</h3>
<p>
	<strong>Setting data in the ItemRenderer: </strong><br />
	In the 'BlogEntryItemRenderer' we will override the the set data function and set a BlogEntryVO with the data of the item renderer:
</p>
<pre class="actionscript3" style="font-family:monospace;">&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> blogEntry<span style="color: #000000; font-weight: bold;">:</span>BlogEntryVO
&nbsp;
override <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> <span style="color: #004993;">data</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span><span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=object%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:object.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Object</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">super</span>.<span style="color: #004993;">data</span> = <span style="color: #004993;">value</span>;
	<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span> <span style="color: #0033ff; font-weight: bold;">is</span> BlogEntryVO<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
		blogEntry = BlogEntryVO<span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;</pre>
<p>
	<strong>Displaying data in the ItemRenderer: </strong><br />
	To display the data values in the itemrenderer we will override updateDisplayList and set values to Labels etc:
</p>
<pre class="actionscript3" style="font-family:monospace;">&nbsp;
override <span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> updateDisplayList<span style="color: #000000;">&#40;</span>unscaledWidth<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Number</span></a>, unscaledHeight<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Number</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">super</span>.updateDisplayList<span style="color: #000000;">&#40;</span>unscaledWidth,unscaledHeight<span style="color: #000000;">&#41;</span>;
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>title_lbl<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
		title_lbl.<span style="color: #004993;">text</span> = blogEntry.title;
		...
&nbsp;</pre>
<h3>Skinning and States in the ItemRenderer</h3>
<p>
	To make the item renderer more attractive and interactive we will create some states. In Flex 4 you can specify not only the name of a state but a name that will define a group of states:
</p>
<pre class="actionscript3" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>states<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>State <span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;normal&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>State <span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;hovered&quot;</span> stateGroups=<span style="color: #990000;">&quot;[hoveredStates]&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>State <span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;selected&quot;</span> stateGroups=<span style="color: #990000;">&quot;[selectedStates]&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>State <span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;normalAndShowsCaret&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>State <span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;hoveredAndShowsCaret&quot;</span> stateGroups=<span style="color: #990000;">&quot;[hoveredStates]&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>State <span style="color: #004993;">name</span>=<span style="color: #990000;">&quot;selectedAndShowsCaret&quot;</span> stateGroups=<span style="color: #990000;">&quot;[selectedStates]&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>s<span style="color: #000000; font-weight: bold;">:</span>states<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;</pre>
<p>
	Having the state and stateGroups names means we can define properties for those states. For example with can set the alpha of the background color as <code>alpha='0'</code> and them the when we are in one of the hovered states as <code>alpha.hoveredStates='.1'</code>:
</p>
<pre class="actionscript3" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>Rect <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;100%&quot;</span> <span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;100%&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>fill<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>SolidColor <span style="color: #004993;">color</span>=<span style="color: #990000;">&quot;0x6699cc&quot;</span> <span style="color: #004993;">alpha</span>=<span style="color: #990000;">&quot;0&quot;</span> <span style="color: #004993;">alpha</span>.hoveredStates=<span style="color: #990000;">&quot;.1&quot;</span> <span style="color: #004993;">alpha</span>.selectedStates=<span style="color: #990000;">&quot;.25&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;/</span>s<span style="color: #000000; font-weight: bold;">:</span>fill<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>s<span style="color: #000000; font-weight: bold;">:</span>Rect<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>Label id=<span style="color: #990000;">&quot;title_lbl&quot;</span>
		 maxDisplayedLines=<span style="color: #990000;">&quot;1&quot;</span>
		 styleName=<span style="color: #990000;">&quot;myriad&quot;</span>
		 <span style="color: #004993;">left</span>=<span style="color: #990000;">&quot;10&quot;</span>
		 <span style="color: #004993;">top</span>=<span style="color: #990000;">&quot;10&quot;</span>
		 <span style="color: #004993;">right</span>=<span style="color: #990000;">&quot;26&quot;</span>
		 textDecoration.hoveredStates=<span style="color: #990000;">&quot;underline&quot;</span>
		 fontWeight.selectedStates=<span style="color: #990000;">&quot;bold&quot;</span>
		 <span style="color: #004993;">color</span>=<span style="color: #990000;">&quot;#000000&quot;</span>
		 <span style="color: #004993;">fontSize</span>=<span style="color: #990000;">&quot;14&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
&nbsp;</pre>
<h3>Summary</h3>
<p>
	This blog post does not cover every bit of code in the example so <a href="http://www.themorphicgroup.com/examples/Flex4ItemRenderer01/Flex4ItemRenderer01.html" target="_blank"><strong>View the Example</strong> with source view enabled</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.themorphicgroup.com/blog/2009/10/15/example-of-feature-rich-item-renderers-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
