Archive

Posts Tagged ‘ItemRenderer’

Displaying the row number or index in a spark List

February 8th, 2010 2 comments

The ItemRenderer class in Flex 4 has an itemIndex property that was added after beta2. You can use this property within your item renderer to display the row number or index of an item in a spark List.
Read more…

Using DataRenderer to add custom states to a spark List renderer

February 7th, 2010 No comments

ItemRenderer has logic built in that changes between some standard states like normal, hovered, selected, etc. You can supplement this logic by overriding ItemRenderer.getCurrentRendererState(), or do away with the built in states altogether by subclassing DataRenderer instead of ItemRenderer.
Read more…

Caching images loaded from a spark item renderer

January 10th, 2010 5 comments

I recently created a form in Flex that required using multiple DropDownLists with a custom item renderer that loads in preview images of each item. This was really easy to do initially, but I noticed a couple performance issues that bothered me. I decided to improve the performance by implementing a simple caching strategy.
Read more…

Different ways of assigning an item renderer in Flex 4

November 2nd, 2009 2 comments

This post looks at a couple ways of defining a custom item renderer on a DataGroup, but it also applies the same way to a SkinnableDataContainer, spark List, and any other spark components that support item rendering.
Read more…

Deleting items in a List from an item renderer

September 23rd, 2009 No comments

It’s easy to delete an item in a spark List from within an item renderer. This is handy if you have a List with a custom renderer that provides a button to delete the item that is associated with that renderer.
Read more…

Expanding item renderers in a DataGroup or List

July 18th, 2009 No comments

The spark DataGroup component is designed to take data items and pass them through an item renderer to create a visual representation of that data. In Flex 4 it is very easy to build custom item renderers.

This sample application demonstrates how you can create an item renderer that only shows some information by default and allows the user to drill down to see more information by clicking on an item or it’s associated “twisty” icon.

Read more…