4 Replies Latest reply on Aug 10, 2011 1:42 AM by EricJ32

    Finding y position of a DataGroup's itemRenderers


      I have a DataGroup which shows a list of steps (like a wizard). There is a pointer next to the current step. The steps aren't clickable; the pointer slides to the next step when a user clicks a "next" button elsewhere in the screen.


      The screen can be skinned in several different ways, and the height of each step can vary both between the skins and also within the same skin (if a step name is long and wraps, for example).


      So, I need to work out somehow how much to move the pointer by when we move to the next step. I can't find a way of getting the y position of each item renderer, and the height of each renderer to make this calculation.


      I've tried adding a RendererExistenceEvent.RENDERER_ADD event listener to the DataGroup and examining the properties at this point (the idea being to add this information to an array to use at the point where I move the pointer), but each y-coordinate is 0 and using UIComponent(event.renderer).localToGlobal(new Point(0,0)) always returns a point of (0,0)?!


      Could anyone point me in the right direction?