can you make a scrollbar wider than default?

hi

I have an info page in my app that is more than one screenful so I set up a  scrollview. I noticed that the scrollbar doesn’t even appear until you touch the screen, and even then it’s minuscule and practically invisible. 

Is there a way to 1) force the scrollbar to show at all times 2) make the scrollbar wider?

thanks,

david

I don’t believe it can be made wider.  I’m also unaware of how to keep it on the screen the whole time.  It’s designed to mimic iOS scrollbars which Steve Jobs despised and they auto-hide in OS-X and iOS.   You could get the open source version from our github repository (http://github.com/coronalabs) and change it to fit your needs.

Rob

OK thanks for the info.

I didn’t try this but the API doc shows you how to use your own image for scrollbar 

http://docs.coronalabs.com/api/library/widget/newScrollView.html#TOC

See the scrollBarOptions section. It might be possible to give it a wider image to draw the scrollbar with. Worth a shot. 

Edit : Nevermind. Tried it and found it not to work. While you can customize the look of the scrollBar in this manner the width of it seems hardcoded in the widget. No matter how wide I made the image file the scrollBar retains its normal width. 

Yes, I found the same thing. I at least created a red scrollbar that is a bit more visible, but it’s still tiny.

Ok. Turns out this is quite easy to achieve with the source posted on github (see Rob’s reference). All you need to do is 

edit widget_momentumScrolling.lua

find “local scrollBarWidth = options.width or 5” and mod it to something like “local scrollBarWidth = 20”

and find “opt.width = options.frameWidth or options.width or themeOptions.width” and mod it to something like “opt.width = 20”

You will need to learn how to override the internal widgets and use the version you just modded. Hint, search for Rob Miracle’s post on where the widgets code can be downloaded and how it can be used. I think it was in the widgets subforum. 

Best of luck!

Is this it?

http://widgetstown.com/add-custom-functionality-to-the-corona-sdk-widgets/

thanks,

David

Yup. Thats one way to override. The other way is discussed in this thread : 

http://forums.coronalabs.com/topic/34183-widgets-20-open-source/

Look for Rob’s post about 1/2 way down.

I don’t believe it can be made wider.  I’m also unaware of how to keep it on the screen the whole time.  It’s designed to mimic iOS scrollbars which Steve Jobs despised and they auto-hide in OS-X and iOS.   You could get the open source version from our github repository (http://github.com/coronalabs) and change it to fit your needs.

Rob

OK thanks for the info.

I didn’t try this but the API doc shows you how to use your own image for scrollbar 

http://docs.coronalabs.com/api/library/widget/newScrollView.html#TOC

See the scrollBarOptions section. It might be possible to give it a wider image to draw the scrollbar with. Worth a shot. 

Edit : Nevermind. Tried it and found it not to work. While you can customize the look of the scrollBar in this manner the width of it seems hardcoded in the widget. No matter how wide I made the image file the scrollBar retains its normal width. 

Yes, I found the same thing. I at least created a red scrollbar that is a bit more visible, but it’s still tiny.

Ok. Turns out this is quite easy to achieve with the source posted on github (see Rob’s reference). All you need to do is 

edit widget_momentumScrolling.lua

find “local scrollBarWidth = options.width or 5” and mod it to something like “local scrollBarWidth = 20”

and find “opt.width = options.frameWidth or options.width or themeOptions.width” and mod it to something like “opt.width = 20”

You will need to learn how to override the internal widgets and use the version you just modded. Hint, search for Rob Miracle’s post on where the widgets code can be downloaded and how it can be used. I think it was in the widgets subforum. 

Best of luck!

Is this it?

http://widgetstown.com/add-custom-functionality-to-the-corona-sdk-widgets/

thanks,

David

Yup. Thats one way to override. The other way is discussed in this thread : 

http://forums.coronalabs.com/topic/34183-widgets-20-open-source/

Look for Rob’s post about 1/2 way down.