Type Function Library widget.* Revision Release 2024.3703 Keywords table view, list view, TableViewWidget, scrollToIndex See also object:scrollToY() widget.newTableView() TableViewWidget
Makes a TableViewWidget scroll to a specific row.
object:scrollToIndex( rowIndex, time, onComplete )
Number. The row index to scroll to.
Number. Time in milliseconds to scroll to the specified row index. 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 scrollComplete() print( "Scroll complete!" ) end -- Scroll to row #20 tableView:scrollToIndex( 20, 800, scrollComplete )