Search code examples
actionscript-3apache-flexflex4

Scroll to selected item in Flex 4 Spark List component


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 !


Solution

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