I have a scrollview that I want to be locked vertically
local scrollView = widget.newScrollView { width = 400, height = 400, left = 0, top = 0, scrollWidth = 800, scrollHeight = 1200, verticalScrollDisabled = true }
When a button is pressed I want the whole scrollview to be locked so I use
scrollview:setIsLocked(true)
Then when the button is pressed again I need it to unlock the scrollview but keep the verticalScrollDisabled to true.
scrollview:setIsLocked(false)
But this code unlocks both axis, and it doesn’t seem to be a way to lock the vertical scrolling again.
This seems like it would be a bug? Any help would be appreciated.
After you unlock it:
scroll._view._isVerticalScrollingDisabled = true
Works perfectly, thanks! Is there a document somewhere that explains these hidden properties?
No and you should realize that this can change in future builds. Not likely soon but it can. I think you should still post a bug report to fix it so it respects what was passed in constructor or add an option to set horz/vert scroll lock post creation.
Hi @RedPistonEB,
As @primoz.cerar suggests, can you please file a bug report for this? It appears that the “setIsLocked( false )” call is applying a blanket unlock to both horizontal and vertical axis, instead of just the axis that was enabled in the declaration.
Thanks,
Brent
After you unlock it:
scroll._view._isVerticalScrollingDisabled = true
Works perfectly, thanks! Is there a document somewhere that explains these hidden properties?
No and you should realize that this can change in future builds. Not likely soon but it can. I think you should still post a bug report to fix it so it respects what was passed in constructor or add an option to set horz/vert scroll lock post creation.
Hi @RedPistonEB,
As @primoz.cerar suggests, can you please file a bug report for this? It appears that the “setIsLocked( false )” call is applying a blanket unlock to both horizontal and vertical axis, instead of just the axis that was enabled in the declaration.
Thanks,
Brent