简体   繁体   中英

How can I get the Item Renderer that is at the top of the viewport in a Flex Spark List?

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.

This should do the trick

listProvider.getItemAt(list.scrollPositionToIndex(list.horizontalScrollPosition,
                                                  list.verticalScrollPosition));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM