Hi all,
I have an odd problem with the scrollbar on the new scrollView widget.
Scrolling itself works fine, but the scrollbar starts half way down my scroll area and disappears off the bottom under my mask as I scroll down (so essentially it’s offset vertically by about 150 pixels).
Code below. Has anyone experienced anything similar to this? It doesn’t always happen - one time it will happen and then the next it won’t. Weird!
I’d obviously like to fix it but if that’s not possible is there any way to hide the scrollbar? Like I say, scrolling works perfectly, it’s just that the scrollbar is off position.
Thanks,
Ian
local widget = require "widget" -- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -- IMAGE SHEET local options = { -- array of tables representing each frame (required) frames = { -- 3 pieces { x = 0, y = 0, width = 6, height = 6 }, { x = 0, y = 6, width = 6, height = 18 }, { x = 0, y = 24, width = 6, height = 6 }, }, -- optional params; used for dynamic resolution support sheetContentWidth = 6, sheetContentHeight = 30, } local imageSheet = graphics.newImageSheet( "scrollbar.png", options ) sv = widget.newScrollView{ width = w, height = h, maskFile = maskFileName, horizontalScrollDisabled = true, backgroundColor = {255,255,255,0}, scrollBarOptions = { sheet = imageSheet, topFrame = 1, middleFrame = 2, bottomFrame = 3, }, } sv.isHitTestMasked = true; sv.x = px; sv.y = py; sv:insert( content ); layer:insert( sv );