0 Replies Latest reply on Jun 4, 2009 6:45 AM by Magick9393

    attach sprite (or similar) as icon to list control

    Magick9393 Level 1

      Hi all

       

      I have been looking at examples such as http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDo cs_Parts&file=00000582.html

       

      and

      http://blog.flexexamples.com/2007/08/17/displaying-icons-in-a-flex-list-control/

       

      both of which have a function that returns a class - and this is the icon that will be attached.

       

      I have a ArrayCollection which contains labels and colors. I currently have the labels added to a list control, and I would like to have beside each label a box filled with the color from the ArrayCollection.

       

      However the above examples would lead me to believe that I would have to dynamically create a bitmap based on the color value. This seems like a rather ineffecient way of doing it.

       

      Can anyone suggest an easier more effecient approach?

       

      Many thanks