Type Function Library widget.* Revision 2017.3060 Keywords widget, scroll view, ScrollViewWidget, scrollTo See also object:scrollToPosition() widget.newScrollView() ScrollViewWidget
Makes a ScrollViewWidget scroll to a specified position constant.
object:scrollTo( position, options )
String. This is the position you wish to scroll to. Valid options are "top"
, "bottom"
, "left"
, or "right"
.
Table. A table that specifies properties of the call — see the next section for details.
Number. Time in milliseconds to scroll to the specified position. For an instantaneous effect (no transition), set this to 0
. Default is 400
.
Function. An optional function that will be called when the scroll completes.
local function onScrollComplete() print( "Scroll complete!" ) end scrollView:scrollTo( "bottom", { time=1200, onComplete=onScrollComplete } )