I have a HorizontalList in Flex that contains some data and an ItemRenderer representing a Page. After the last item (Page) in the list, I want to have a button - a Plus to create a new page.
What data can I look at to get the proper x,y position of the last ItemRenderer? I'm getting the position of
this.listContent.listItems[this.listContent.listItems.length-1];
which gives me the proper ItemRenderer instanceBut, but its x and y have been used for the index position of the ItemRenderer in the list. I want something in pixels relative to the list itself so I can position a button in UpdateDisplayList().
I'm interested in doing this via the UIComponent overrides instead of through the ItemRenderer itself because it doesn't seem like this is something that should live in the dataProvider... it would need to be some weird "lastItem" object that the ItemRenderer looked for and just seems odd. Plus, this is a fairly useful function for lists in general.
So, any ideas on this or other approaches?