2 Replies Latest reply on May 16, 2011 5:24 AM by Nishant Jha28

    List custom itemRenderer disabled state

    wilsonsilva7

      Is there a way to implement a disabled state on a (Spark) List ItemRenderer? I'm developing a List that has a counter on each of it's items. When a user drops that item, the counter decreases. When the item counter reaches 0 the item becomes disabled and the item image becomes black and white.

       

      I have the disabled state in my custom item renderer but it doens't work. It's state should become "disabled" when I set the enabled property to false.  I've tried to manually set the itemRenderer.currentState to "disabeld" and it becomes "normal" after I click on the list or if I resize the window.

       

      This is how it should look like (notice that only the orange item is enabled and has colors because his counter still has 9 items):

      disabled.png

       

      I have no idea what's going in the background, can you please point me into the right direction?

       

      Here's the SWF (source enabled )

      http://dl.dropbox.com/u/6767802/Examples/ListItemDisabledIssue/Flex4ListIssue.html