views:

21

answers:

1

I have a Flex Spark List (well it's a Tree to be precise but it renders as a list) and as I'm scrolling through it I want to provide information about the item that is currently at the top of the list in context to the viewport. So this could be the 100th item in the list depending on how far you've scrolled down.

A: 

This should do the trick

listProvider.getItemAt(list.scrollPositionToIndex(list.horizontalScrollPosition,
                                                  list.verticalScrollPosition));
Faheem
I'd love to mark this answer as correct but scrollPositionToindex is not being recognised as a method of my List. Maybe it's deprecated. More soon ...
Lee Probert
My bad. It is halo list method. You should check scroller for spark list
Faheem