Scroll to selected item in Flex 4 Spark List component

actionscript-3, apache-flex, flex4

Solution

Try the `s:List` method ensureIndexIsVisible(index:int):void.

Problem

I'm setting selected element in s:List component with Actionscript, it works, but List doesn't scroll to selected item -- need to scroll with scrollbar or mouse. Is it possible to auto-scroll to selected item ? Thanks !

Original source