1 Reply Latest reply on Sep 8, 2010 9:20 AM by Flex harUI

    custom itemRenderer not working on initial drop down, one reuse of an IR and it works, ideas?

    gtbus

      I've created a spark DropDownList extension which has icons next to the label.  To do this I use a skin for the DropDownList, where I added logic and an Image component (which renders the icon from a byte array in the DropDownList's dataProvider) and a Label Component, and a spark ItemRenderer extension, which has itself an Image component (which renders the icon from the same byte array on the DropDownList's dataProvider) and a Label component.

       

      The component works, but on doing the initial drop down (when the DropDownList is 'opened') no icons are shown (although the space for them is there).  As soon as I move through the list (by using the scrollbar or the mousewheel) the icons appear (all icons on the shown on the list at the same time, even if the scroll is moved only one item up or down).

       

      Has anyone an idea why this might be happening?  Or,

      is there a way I can call an 'update' or 'refresh' or 'reuse' renderers function directly on the IR itself?

       

      The component works as expected as soon as one IR on it is reused, but I can't find out why...

       

      Thanks!

      gtb