Recently I played with custom scrollbar settings for Table view and noticed that if I’m trying to use wide scrollbar it appears cutted and ugly.
I investigated widget repository - https://github.com/coronalabs/framework-widget and found root cause of this issue: in widgetLibrary/widget_momentumScrolling.lua file scrollbar width was set to:
local scrollBarWidth = options.width or 5
But there are no possibility to pass width into scroll options.
Some lines below width was determined another way:
opt.width = options.frameWidth or options.width or themeOptions.width
So based on my investigation I write hack to fix scroll position in code:
timer.performWithDelay(100, function() local fg = tableObject.\_view.\_fixedGroup fg.x = fg.x + 2.5 - scrollFrameSize \* 0.5 end)
2.5 is half of default width.
scrollFrameSize is scrollbar frame size that I use in code
Timer is needed because scroll view will be created on next frame after table creation.
I also submited this issue to corona helpdesk and prepared pull request on github - https://github.com/coronalabs/framework-widget/pull/16
TL;DR; If you want to use custom scrollbar with width > 5px then use code above to fix it position