object:getContentPosition()

Type Function
Library widget.*
Return value Numbers
Revision Release 2024.3703
Keywords widget, scroll view, ScrollViewWidget, getContentPosition
See also widget.newScrollView()
ScrollViewWidget

Overview

Returns the x and y coordinates of the ScrollViewWidget content.

Gotchas

This function only returns the correct values if the padding along the appropriate axis is set to 0, in specific leftPadding and rightPadding for x values or topPadding and bottomPadding for y values.

Syntax

object:getContentPosition()

Example

local x, y = scrollView:getContentPosition()