I had the list index issue myself back in the days but under flex 3. I manage to fix it by implementing the IDropInListItemRenderer myself in my custom renderer. You should be able to do this with the spark component.
HTH, Claudiu ________________________________ From: Cory <[email protected]> To: [email protected] Sent: Sun, January 24, 2010 6:26:08 AM Subject: [flexcoders] Using a VBox container inside a ListItemRenderer Hello, I'm trying to use a custom component based on a ListItemRenderer object as an item renderer for my List, and I'm getting compiler errors telling me that the VBox object I'm using inside my item renderer does not implement IUIComponent. This is confusing, since VBox certainly is in the inheritance tree of UIComponent which does implement IUIComponent. What am I not understanding? Is this a bug? I originally was using a custom component based off a spark ItemRenderer, and inside this component I have a VBox container to organize the other drawable components (labels and text fields). Unfortunately, I could not figure out any way to query the current ItemRenderer' s index in the List object. However, ListItemRenderer implements IDropInListItemRend erer, which gives access to the listData property. This property then gives access to the list index value. However, if I change my component to be based on a ListItemRenderer, I get the previously mentioned compiler errors. This is a Flex 4 project using Flash Builder 4 Beta 2. Can anyone explain why VBox containers would not be supported inside a ListItemRenderer? Thanks in advance!

