开发者

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

开发者 https://www.devze.com 2023-01-21 20:53 出处:网络
I have a Flex Spark List (well it\'s a Tree to开发者_StackOverflow 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

I have a Flex Spark List (well it's a Tree to开发者_StackOverflow 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));
0

精彩评论

暂无评论...
验证码 换一张
取 消