How to skin spark List component so that every adjacent itemRenderer has different color (something like mx DataGrid)?
+1
A:
You can do this by creating a custom renderer derived from ItemRenderer and overriding the itemIndex setter. In your overridden method, set the background color based on whether the item index is odd or even. The Adobe docs have an example of this which you can find in this section:
Hope that helps.
Wade Mueller
2010-08-10 22:12:13
Great, thanks, it helps. There is also another way using alternatingItemColors="[0x00ff00, 0xff0000]"
dede
2010-08-17 18:40:07
Good point, I forgot about that one. :)
Wade Mueller
2010-08-17 18:50:28