Chris Smith
Chris Smith

Reputation: 764

Make Flex List Scroll To Bottom

I have a Flex Spark List which can be populated with any number of rows. Each row can have a variable height with a minimum of 50px. I need a way to scroll to the "true" bottom. By true I mean the end of the last row. Since I'm new to AS and Flex, implementation & use code would be appreciated if anything advanced is needed (e.g extending classes etc).

Upvotes: 3

Views: 2163

Answers (1)

Jonathan Rowny
Jonathan Rowny

Reputation: 7588

After your list is done rendering, you can try:

yourList.layout.verticalScrollPosition += yourList.layout.getVerticalScrollPositionDelta(NavigationUnit.END);

there's a blog post about it here: http://flexponential.com/2011/02/13/scrolling-to-the-bottom-of-a-spark-list/

Upvotes: 5

Related Questions