List with multilined (word wrapping) item renderer - how to scroll to the bottom? With test case and screenshots

元气小坏坏 提交于 2019-12-02 08:59:30

Found the answer myself at the Flexponential blog Scrolling to the bottom of a spark List:

    public static function scrollToBottom(list:List):void {
        // update the verticalScrollPosition to the end of the List
        // virtual layout may require us to validate a few times
        var delta:Number = 0;
        var count:int = 0;

        while (count++ < 10) {
            list.validateNow();
            delta = list.layout.getVerticalScrollPositionDelta(NavigationUnit.END);
            list.layout.verticalScrollPosition += delta;

            if (delta == 0)
                break;
        }
    }           
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!