Can't get custom scrollbar to appear

Since there was no example that I saw for doing a custom scroll bar, is this code correct?

 local scrollViewSheetOptions = { frames = { { x=2, y=2, width=16, height=16, }, { x=2, y=20, width=16, height=16, }, { x=2, y=38, width=16, height=16, }, }, sheetContentWidth = 32, sheetContentHeight = 64 } local scrollViewImageSheet = graphics.newImageSheet( "Images/scrollview.png", scrollViewSheetOptions ) myScrollView = widget.newScrollView { left = 80, top = 202, width = 608, height = 680, id = "myScrollView", backgroundColor = { 0, 0, 0 }, maskFile = "Images/myMask.png", horizontalScrollDisabled = true, hideScrollBar = false, scrollBarOptions = { sheet = scrollViewImageSheet, topFrame = 1, middleFrame = 2, bottomFrame = 3 } }

If I change the background color to something light, like 255, 255, 255, the default scroll bar appears.  But the default scroll bar doesn’t work on a black background, so I created a simple PNG with the three pieces. 

My custom scroll bar doesn’t appear on light backgrounds either.  I’ve never used image sheets before, so not sure if I am missing something here.

Anyone?  No one has created their own scrollbar?

I have it working with a tableView, but not a scrollView, but they should be the same.  Your code looks right.   Try adding a:

width=16,

height=16,

to the scrollBarOptions.   The default is 10px, and if those are not set, it will look for 10px squares. 

Rob,

I made the change, but no difference.   

If I change the background to white, the standard scroll bar appears.  It is like it is not finding the new image sheet.  What would cause that?

I modified the Scroll View sample code with my image and code and cannot get the custom scroll bar to appear there either.

Logged a bug: Case 24489

Thanks.  Filing a bug with a reproducible case really helps the engineers.

Anyone?  No one has created their own scrollbar?

I have it working with a tableView, but not a scrollView, but they should be the same.  Your code looks right.   Try adding a:

width=16,

height=16,

to the scrollBarOptions.   The default is 10px, and if those are not set, it will look for 10px squares. 

Rob,

I made the change, but no difference.   

If I change the background to white, the standard scroll bar appears.  It is like it is not finding the new image sheet.  What would cause that?

I modified the Scroll View sample code with my image and code and cannot get the custom scroll bar to appear there either.

Logged a bug: Case 24489

Thanks.  Filing a bug with a reproducible case really helps the engineers.

@thegdog were you able to make it work ? If so do you have some sample code and the png as an example ?

Thanks

Nick

@thegdog were you able to make it work ? If so do you have some sample code and the png as an example ?

Thanks

Nick

Also having problems here with the scrollbar.  I am using a config screen of 1280 x 1920 and the scrollbar is super small (almost invisible), both the default one or a custom one (using imagesheet).

I believe that the widget scroll bars currently do not scale and are designed to work with a 320x480 content area.

Rob

Thanks for reply Rob.  Indeed, I read on the docs that it doesn’t support scaling, but I understood that it would only be related to the scale() function.

If it was hardcoded to the 320x480 layout, you are right, no way to have it working.

Just created a custom scrollview instead for my case. Thanks!

Also having problems here with the scrollbar.  I am using a config screen of 1280 x 1920 and the scrollbar is super small (almost invisible), both the default one or a custom one (using imagesheet).

I believe that the widget scroll bars currently do not scale and are designed to work with a 320x480 content area.

Rob

Thanks for reply Rob.  Indeed, I read on the docs that it doesn’t support scaling, but I understood that it would only be related to the scale() function.

If it was hardcoded to the 320x480 layout, you are right, no way to have it working.

Just created a custom scrollview instead for my case. Thanks!