2 Replies Latest reply on Aug 7, 2010 7:43 AM by -skitch-

    Flex list icon states

    -skitch- Level 1

      Hello all,


      I have a list where each item has the same icon.  I want the icon to have a rollover state...


      I can't do this through the list functions IconField or IconFunction because they only fire when the data changes.


      Is there a way to swap icons in and out within the item renderer?  I'm not getting any luck with it.


      Are there any other approaches?




        • 1. Re: Flex list icon states
          Flex harUI Adobe Employee

          Should be "easy" with Spark List in Flex 4.


          In mx:List, updateDisplayList should get called in the renderer.

          • 2. Re: Flex list icon states
            -skitch- Level 1

            Cool thanks,


            One more question, the icon is an IFlexDisplayObject, how would i set that to be an image?


            I have the image embeded into a class, but I can't seem to get the icon to work in the itemrenderer...




                    public var contextOverIconClass:Class;


                    this.icon = new contextOverIconClass() as IFlexDisplayObject;