views:

126

answers:

1

Hello,

I have:

  • an ArrayCollection of Numbers;
  • a List using the above ArrayCollection as it's dataprovider, and virtualLayout=true;
  • a custom ItemRenderer that shows a label with: a) the number b) an y position depending on the number AND the highest number visible

In another words, if I have 10 numbers in the AC, and only 5 appear on the screen, the y position of those 5 will depend on the value of the maximum number for those 5. When the user scrolls, of course those 5 elements change so the position of the label in item renderers will change.

My questions:

1) How can I get the list of items that are "currently" visible? 2) Which event/method to override will help me know that the List was scrolled/the visible items changed?

Thank you,

João Saleiro

A: 

((list.dataGroup.layout) as VerticalLayout).rowCount might be just what you're looking for

Dragos