Scrollbar color within a field

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Scrollbar color within a field

Post by tyarmsteadBUSuSfT » Tue Apr 16, 2013 1:29 am

Am I able to change the size an color of a fields scrollbar?
I tried:
set the vScrollbar of field "Idea List" to true
--for a larger scrollbar
set the scrollbarwidth of field "Idea List" to 25
set the backgroundcolor of the vScrollbar of field "idea List" to 60,130,200
set the itemDel to tab

Thank you,
Ty

tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Re: Scrollbar color within a field

Post by tyarmsteadBUSuSfT » Tue Apr 16, 2013 1:34 am

I see one mistake with the width.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Scrollbar color within a field

Post by Simon » Tue Apr 16, 2013 2:33 am

I found this awhile ago it's for making a custom scrollbar:
http://runrev.com/developers/lessons-an ... -controls/
You will be able to change any of the settings.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Re: Scrollbar color within a field

Post by tyarmsteadBUSuSfT » Wed Apr 17, 2013 1:35 am

I donwloaded the code and placed it in the group "scrollbar"
I still can not get it to work. I am testing with a scrollable field with data. I have also put the following code in the card script:
on scrollbarSetup pScrollbar
set the cUpdateLock of pBar to true
set the cOrientation of pBar to "vertical"
set the cStartValue of pBar to 0
set the cEndValue of pBar to 20000
set the cThumbSize of pBar to 2000
set the cThumbPosition of pBar to 5000
set the cLineInc of pBar to 512
set the cPageInc of pBar to 8192
set the cUpdateLock of pBar to false
end scrollbarSetup
I'm just stuck maybe after trying to follow and understand the code.
thank you for your help

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Scrollbar color within a field

Post by Simon » Wed Apr 17, 2013 1:54 am

There is an example stack on that page that works.
It throws a couple of errors but you should see why they are caused.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Re: Scrollbar color within a field

Post by tyarmsteadBUSuSfT » Sat Apr 20, 2013 12:53 am

Simon, I apologize but I am unable to get the scrollbar to control the scrollable field. I have stepped through the code and still find why it won't work, I've grouped the filed and the scrollbar and tried code in the group, the field, and the card. I have tried to determine what is causing the error but to no avail. Any help would be greatly appreciated.
Thank you

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Scrollbar color within a field

Post by Simon » Sat Apr 20, 2013 2:52 am

There is another stack in User Samples.
Search on scrollbar.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Post Reply