1 Reply Latest reply on Dec 15, 2011 10:26 AM by Flex harUI

    RendererAdd event not calling for all list Item?

    Manu Suresh




      I am using a list  with itemRenderer.  Currently i  have list item index using that will get list object.I want to set list scroll position depends on  list object.

      I tried to calculate listItem height using rendererAdd event.


      private function onRendererAdd(event:RendererExistenceEvent):void


          var renderer:EventListItemRenderer = new EventListItemRenderer();

          if(event.index >0)


              var renderer:EventListItemRenderer = lstEvents.dataGroup.getElementAt(event.index-1) as EventListItemRenderer;


          lstEvents.layout.verticalScrollPosition += renderer.height;



      But above  function is not calling for all list Item. It is calling for nearly half of the listItems.


      Thanks in Advance,