<?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: Displaying different fonts in a Spark List control in Flex 4</title>
	<atom:link href="http://blog.flexexamples.com/2009/07/17/displaying-different-fonts-in-a-spark-list-control-in-flex-4/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2009/07/17/displaying-different-fonts-in-a-spark-list-control-in-flex-4/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 19:26:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2009/07/17/displaying-different-fonts-in-a-spark-list-control-in-flex-4/comment-page-1/#comment-7568</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Thu, 22 Apr 2010 22:58:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1365#comment-7568</guid>
		<description>@A V,

I may be wrong, but I thought that the Boolean ItemRenderer &lt;code&gt;autoDrawBackground&lt;/code&gt; property handles all that for you and you could probably just use something like this for an item renderer and have the &lt;code&gt;rollOverColor&lt;/code&gt; and &lt;code&gt;selectionColor&lt;/code&gt; styles applied to the item renderer:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:ItemRenderer name=&quot;CustomItemRenderer&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;
        autoDrawBackground=&quot;true&quot;&gt;
    
    &lt;s:Label text=&quot;{data.label}&quot;
            left=&quot;2&quot; right=&quot;2&quot; top=&quot;4&quot; bottom=&quot;4&quot; /&gt;
    
&lt;/s:ItemRenderer&gt;
&lt;/pre&gt;

In fact, I would probably advise against a lot of data binding in your item renderers due to possible performance problems.

Peter</description>
		<content:encoded><![CDATA[<p>@A V,</p>
<p>I may be wrong, but I thought that the Boolean ItemRenderer <code>autoDrawBackground</code> property handles all that for you and you could probably just use something like this for an item renderer and have the <code>rollOverColor</code> and <code>selectionColor</code> styles applied to the item renderer:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:ItemRenderer</span> name=<span style="color: #ff0000;">&quot;CustomItemRenderer&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>
<span style="color: #000000;">        autoDrawBackground=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;{data.label}&quot;</span></span>
<span style="color: #000000;">            left=<span style="color: #ff0000;">&quot;2&quot;</span> right=<span style="color: #ff0000;">&quot;2&quot;</span> top=<span style="color: #ff0000;">&quot;4&quot;</span> bottom=<span style="color: #ff0000;">&quot;4&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:ItemRenderer</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>In fact, I would probably advise against a lot of data binding in your item renderers due to possible performance problems.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A V</title>
		<link>http://blog.flexexamples.com/2009/07/17/displaying-different-fonts-in-a-spark-list-control-in-flex-4/comment-page-1/#comment-7566</link>
		<dc:creator>A V</dc:creator>
		<pubDate>Thu, 22 Apr 2010 22:29:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1365#comment-7566</guid>
		<description>Thanks for the quick response. I was doing something a little different (a custom ItemRenderer) but was getting the identical error. I found the solution, however. Moving to 4.0.0 release compiler from the beta 2 sdk, the default styles (selectionColor, contentBackgroundColor, etc.) are no longer directly referencable from within my extending class, as in:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;s:fill&gt;
    &lt;s:SolidColor color.normal=&quot;{contentBackgroundColor)}&quot;
            color.normalAndShowsCaret=&quot;{contentBackgroundColor}&quot;
            color.hovered=&quot;{rollOverColor}&quot;
            color.hoveredAndShowsCaret=&quot;{rollOverColor}&quot;
            color.selected=&quot;{selectionColor)}&quot;
            color.selectedAndShowsCaret=&quot;{selectionColor)}&quot; /&gt;
&lt;/s:fill&gt;
&lt;/pre&gt;

I was required to call &lt;code&gt;getStyle()&lt;/code&gt;  to access the styles, as below:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;s:fill&gt;
    &lt;s:SolidColor color.normal=&quot;{getStyle(&#039;contentBackgroundColor&#039;)}&quot;
            color.normalAndShowsCaret=&quot;{getStyle(&#039;contentBackgroundColor&#039;)}&quot;
            color.hovered=&quot;{getStyle(&#039;rollOverColor&#039;)}&quot;
            color.hoveredAndShowsCaret=&quot;{getStyle(&#039;rollOverColor&#039;)}&quot;
            color.selected=&quot;{getStyle(&#039;selectionColor&#039;)}&quot;
            color.selectedAndShowsCaret=&quot;{getStyle(&#039;selectionColor&#039;)}&quot; /&gt;
&lt;/s:fill&gt;
&lt;/pre&gt;

More info here: https://opensource.adobe.com/wiki/display/flexsdk/Item+Renderer+Changes</description>
		<content:encoded><![CDATA[<p>Thanks for the quick response. I was doing something a little different (a custom ItemRenderer) but was getting the identical error. I found the solution, however. Moving to 4.0.0 release compiler from the beta 2 sdk, the default styles (selectionColor, contentBackgroundColor, etc.) are no longer directly referencable from within my extending class, as in:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:fill</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColor</span> color.normal=<span style="color: #ff0000;">&quot;{contentBackgroundColor)}&quot;</span></span>
<span style="color: #000000;">            color.normalAndShowsCaret=<span style="color: #ff0000;">&quot;{contentBackgroundColor}&quot;</span></span>
<span style="color: #000000;">            color.hovered=<span style="color: #ff0000;">&quot;{rollOverColor}&quot;</span></span>
<span style="color: #000000;">            color.hoveredAndShowsCaret=<span style="color: #ff0000;">&quot;{rollOverColor}&quot;</span></span>
<span style="color: #000000;">            color.selected=<span style="color: #ff0000;">&quot;{selectionColor)}&quot;</span></span>
<span style="color: #000000;">            color.selectedAndShowsCaret=<span style="color: #ff0000;">&quot;{selectionColor)}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:fill</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>I was required to call <code>getStyle()</code>  to access the styles, as below:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:fill</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColor</span> color.normal=<span style="color: #ff0000;">&quot;{getStyle('contentBackgroundColor')}&quot;</span></span>
<span style="color: #000000;">            color.normalAndShowsCaret=<span style="color: #ff0000;">&quot;{getStyle('contentBackgroundColor')}&quot;</span></span>
<span style="color: #000000;">            color.hovered=<span style="color: #ff0000;">&quot;{getStyle('rollOverColor')}&quot;</span></span>
<span style="color: #000000;">            color.hoveredAndShowsCaret=<span style="color: #ff0000;">&quot;{getStyle('rollOverColor')}&quot;</span></span>
<span style="color: #000000;">            color.selected=<span style="color: #ff0000;">&quot;{getStyle('selectionColor')}&quot;</span></span>
<span style="color: #000000;">            color.selectedAndShowsCaret=<span style="color: #ff0000;">&quot;{getStyle('selectionColor')}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:fill</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>More info here: <a href="https://opensource.adobe.com/wiki/display/flexsdk/Item+Renderer+Changes" rel="nofollow">https://opensource.adobe.com/wiki/display/flexsdk/Item+Renderer+Changes</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2009/07/17/displaying-different-fonts-in-a-spark-list-control-in-flex-4/comment-page-1/#comment-7563</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Thu, 22 Apr 2010 21:01:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1365#comment-7563</guid>
		<description>@A V,

I just compiled the above example with Flex 4.0 and Flex 4.1 beta and didn&#039;t get any errors. Were you using the above code, or something slightly different?

Peter</description>
		<content:encoded><![CDATA[<p>@A V,</p>
<p>I just compiled the above example with Flex 4.0 and Flex 4.1 beta and didn&#8217;t get any errors. Were you using the above code, or something slightly different?</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A V</title>
		<link>http://blog.flexexamples.com/2009/07/17/displaying-different-fonts-in-a-spark-list-control-in-flex-4/comment-page-1/#comment-7561</link>
		<dc:creator>A V</dc:creator>
		<pubDate>Thu, 22 Apr 2010 18:23:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1365#comment-7561</guid>
		<description>Would you mind sharing what you did to get rid of the &quot;Access of undefined property selectionColor&quot; error with the newer 4.0.0 sdk? I&#039;m currently porting something and getting the same error.

Thanks,
-V</description>
		<content:encoded><![CDATA[<p>Would you mind sharing what you did to get rid of the &#8220;Access of undefined property selectionColor&#8221; error with the newer 4.0.0 sdk? I&#8217;m currently porting something and getting the same error.</p>
<p>Thanks,<br />
-V</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2009/07/17/displaying-different-fonts-in-a-spark-list-control-in-flex-4/comment-page-1/#comment-6870</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Fri, 29 Jan 2010 02:09:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1365#comment-6870</guid>
		<description>Done! Updated post to work with Flex SDK 4.0.0.13771.

Peter</description>
		<content:encoded><![CDATA[<p>Done! Updated post to work with Flex SDK 4.0.0.13771.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2009/07/17/displaying-different-fonts-in-a-spark-list-control-in-flex-4/comment-page-1/#comment-6869</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Fri, 29 Jan 2010 02:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1365#comment-6869</guid>
		<description>@ATD,

Yeah, a bunch of these posts are out of sync with the latest API changes... I&#039;ll take a look and update the post in a few minutes.

Peter</description>
		<content:encoded><![CDATA[<p>@ATD,</p>
<p>Yeah, a bunch of these posts are out of sync with the latest API changes&#8230; I&#8217;ll take a look and update the post in a few minutes.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ATD</title>
		<link>http://blog.flexexamples.com/2009/07/17/displaying-different-fonts-in-a-spark-list-control-in-flex-4/comment-page-1/#comment-6866</link>
		<dc:creator>ATD</dc:creator>
		<pubDate>Fri, 29 Jan 2010 01:23:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1365#comment-6866</guid>
		<description>Hi Peter,

This doesn&#039;t work in the newest version of the Flex 4 framework.



throws this error:  1120:Access of undefined property selectionColor

I will dig and post if I come up with the fix.</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>This doesn&#8217;t work in the newest version of the Flex 4 framework.</p>
<p>throws this error:  1120:Access of undefined property selectionColor</p>
<p>I will dig and post if I come up with the fix.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

