Scroll to selected item in Flex 4 Spark List component

前端 未结 12 1533
感动是毒
感动是毒 2020-12-15 17:46

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 pos

12条回答
  •  温柔的废话
    2020-12-15 17:57

    You'll probably want to access the List's scroller directly and do something like:

    list.scroller.scrollRect.y = list.itemRenderer.height * index;

提交回复
热议问题