<?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: List/ComboBox Row Backgrounds in Flex</title>
	<atom:link href="http://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/</link>
	<description>Thoughts, rants, and even some code from the mind of Barney Boisvert.</description>
	<lastBuildDate>Thu, 11 Sep 2014 09:58:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Theo Denovan</title>
		<link>https://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/comment-page-1/#comment-201948</link>
		<dc:creator>Theo Denovan</dc:creator>
		<pubDate>Sun, 10 Jan 2010 04:15:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/#comment-201948</guid>
		<description>The drawRowBackground method is not called by the List class in Flex unless the style alternatingItemColors style is specified. (The method is called by the drawRowBackgrounds method).

The simplest alternative is to override the drawRowBackgrounds method, duplicating the base functionality but removing the alternatingItemColors style check.</description>
		<content:encoded><![CDATA[<p>The drawRowBackground method is not called by the List class in Flex unless the style alternatingItemColors style is specified. (The method is called by the drawRowBackgrounds method).</p>
<p>The simplest alternative is to override the drawRowBackgrounds method, duplicating the base functionality but removing the alternatingItemColors style check.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Syed</title>
		<link>https://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/comment-page-1/#comment-199703</link>
		<dc:creator>Syed</dc:creator>
		<pubDate>Thu, 17 Dec 2009 19:55:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/#comment-199703</guid>
		<description>Christian...
in the drawRowBackground...

&lt;pre&gt;
override protected function drawRowBackground(s:Sprite, 
        rowIndex:int, y:Number, height:Number, color:uint, dataIndex:int):void
  	    {
  	    	var newColor:uint;
	  			switch(dataIndex)
...
&lt;/pre&gt;

use the dataIndex... not the rowIndex</description>
		<content:encoded><![CDATA[<p>Christian&#8230;<br />
in the drawRowBackground&#8230;</p>
<pre>
override protected function drawRowBackground(s:Sprite,
        rowIndex:int, y:Number, height:Number, color:uint, dataIndex:int):void
  	    {
  	    	var newColor:uint;
	  			switch(dataIndex)
...
</pre>
<p>use the dataIndex&#8230; not the rowIndex</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/comment-page-1/#comment-186486</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Fri, 24 Jul 2009 18:13:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/#comment-186486</guid>
		<description>kandasami,

The code in the post is the complete sample, aside from replacing &lt;mx:List ...&gt; with &lt;v:RowColoringList ...&gt;.  Do keep in mind that the code is over two years old and Flex has evolved significantly in that time, so it&#039;s entirely possible (and probably likely) that it doesn&#039;t work with the current framework.</description>
		<content:encoded><![CDATA[<p>kandasami,</p>
<p>The code in the post is the complete sample, aside from replacing <mx :List ...> with <v :RowColoringList ...>.  Do keep in mind that the code is over two years old and Flex has evolved significantly in that time, so it's entirely possible (and probably likely) that it doesn't work with the current framework.</v></mx></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kandasami raja</title>
		<link>https://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/comment-page-1/#comment-186448</link>
		<dc:creator>kandasami raja</dc:creator>
		<pubDate>Fri, 24 Jul 2009 11:11:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/#comment-186448</guid>
		<description>hi 
     i created a custom list component class and i override the drawRowBackground method as u mentioned  .wen i create object for RowColoringList  it cannot call the drawRowBackground method . wen will this method will call. do u hava any sample files 

 
thanks 
kandasami raja.c

kandaraja @ gmail . com</description>
		<content:encoded><![CDATA[<p>hi<br />
     i created a custom list component class and i override the drawRowBackground method as u mentioned  .wen i create object for RowColoringList  it cannot call the drawRowBackground method . wen will this method will call. do u hava any sample files </p>
<p>thanks<br />
kandasami raja.c</p>
<p>kandaraja @ gmail . com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/comment-page-1/#comment-119191</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Wed, 27 Aug 2008 16:59:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/#comment-119191</guid>
		<description>Christian,

I honestly don&#039;t know.  I&#039;d imagine it&#039;s just a matter of implementing the passed rowColoringFunction to use the right offsets.  I haven&#039;t done any Flex development in a long; we gave up on the platform and switched to doing everything with JS.  Fewer platform-specific problems, far faster development, easier testing, etc.</description>
		<content:encoded><![CDATA[<p>Christian,</p>
<p>I honestly don't know.  I'd imagine it's just a matter of implementing the passed rowColoringFunction to use the right offsets.  I haven't done any Flex development in a long; we gave up on the platform and switched to doing everything with JS.  Fewer platform-specific problems, far faster development, easier testing, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian</title>
		<link>https://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/comment-page-1/#comment-119110</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Wed, 27 Aug 2008 09:05:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/#comment-119110</guid>
		<description>Hi,

The thing is that I have the list with a vertical scroll bar.... If, for instance, the second item is &quot;orange&quot;, when is scroll down the third item will become orange. If I scroll once more the fourth is &quot;orange&quot;, etc... 

I want the colour to be attached to the actual ITEM... not to the index shown on screen!.

Can you help please.

Thanks,
Chris.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>The thing is that I have the list with a vertical scroll bar&#8230;. If, for instance, the second item is "orange", when is scroll down the third item will become orange. If I scroll once more the fourth is "orange", etc&#8230; </p>
<p>I want the colour to be attached to the actual ITEM&#8230; not to the index shown on screen!.</p>
<p>Can you help please.</p>
<p>Thanks,<br />
Chris.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/comment-page-1/#comment-91906</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Mon, 26 May 2008 16:27:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/#comment-91906</guid>
		<description>Amit,

That function gets passed in the index of the current row, both in the grid and in the data provider, so you should be able to use those to figure out what data (in your provider) the row is fronting, and do whatever logic is needed from there.  I&#039;m not exactly sure how that would work with a Tree (since the data is hierarchical), but the same idea should work.</description>
		<content:encoded><![CDATA[<p>Amit,</p>
<p>That function gets passed in the index of the current row, both in the grid and in the data provider, so you should be able to use those to figure out what data (in your provider) the row is fronting, and do whatever logic is needed from there.  I'm not exactly sure how that would work with a Tree (since the data is hierarchical), but the same idea should work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit</title>
		<link>https://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/comment-page-1/#comment-91858</link>
		<dc:creator>Amit</dc:creator>
		<pubDate>Mon, 26 May 2008 12:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/#comment-91858</guid>
		<description>Hi, I need different row colors(not alternating) in a Tree based on some condition. Any idea how to do this?</description>
		<content:encoded><![CDATA[<p>Hi, I need different row colors(not alternating) in a Tree based on some condition. Any idea how to do this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Code Sweat Blog &#187; Blog Archive &#187; Some Flex 2 Related Links (pt. two)</title>
		<link>https://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/comment-page-1/#comment-23653</link>
		<dc:creator>Code Sweat Blog &#187; Blog Archive &#187; Some Flex 2 Related Links (pt. two)</dc:creator>
		<pubDate>Thu, 05 Jul 2007 14:29:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/#comment-23653</guid>
		<description>[...] List/ComboBox Row Backgrounds in Flex at BarneyBlog [...]</description>
		<content:encoded><![CDATA[<p>[...] List/ComboBox Row Backgrounds in Flex at BarneyBlog [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/comment-page-1/#comment-22766</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Thu, 28 Jun 2007 20:33:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/2007/06/22/listcombobox-row-backgrounds-in-flex/#comment-22766</guid>
		<description>The DataGrid extension is exactly the same, just with this line:

  public class RowColoringList extends List {

replaced with this one:

  public class RowColoringDataGrid extends DataGrid {

Obviously the import line needs to change as well.</description>
		<content:encoded><![CDATA[<p>The DataGrid extension is exactly the same, just with this line:</p>
<p>  public class RowColoringList extends List {</p>
<p>replaced with this one:</p>
<p>  public class RowColoringDataGrid extends DataGrid {</p>
<p>Obviously the import line needs to change as well.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
