Type Function Library widget.* Revision 2017.3060 Keywords widget, scroll view, ScrollViewWidget, setIsLocked See also widget.newScrollView() ScrollViewWidget
Sets a ScrollViewWidget to either locked (does not scroll) or unlocked (default behavior). Optionally, you can lock or unlock the scroll view on a specific directional axis.
object:setIsLocked( isLocked [, axis] )
Boolean. Set to true
to lock the scroll view; false
to unlock the scroll view.
String. Directional axis upon which to lock or unlock the scroll view, either "horizontal"
or "vertical"
.
local scrollView = widget.newScrollView { width = 400, height = 400, left = 0, top = 0, scrollWidth = 800, scrollHeight = 1200, hideBackground = false } local function lockScrollView() scrollView:setIsLocked( true ) end -- Lock the scroll view after 2 seconds timer.performWithDelay( 2000, lockScrollView )
local scrollView = widget.newScrollView { width = 400, height = 400, left = 0, top = 0, scrollWidth = 800, scrollHeight = 1200, hideBackground = false } -- Lock the scroll view only on the horizontal axis scrollView:setIsLocked( true, "horizontal" )