How does one set the Slider position of a ScrollBar with script from a button?
I have tried the code below, but none work:
on mouseUp
set newValue of scrollbar "BooksScrollBar" to 2000
end mouseUp
also tried:
on mouseUp
set vscroll of scrollbar "BooksScrollBar" to 2000
end mouseUp
also tried:
on mouseUp
set field of scrollbar "BooksScrollBar" to 2000
end mouseUp
Definitely Need Help.
Thanks,
David
ScrollBar -Set Slider position with script - Solved
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
ScrollBar -Set Slider position with script - Solved
Last edited by DR White on Thu Sep 19, 2013 2:58 am, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 184
- Joined: Wed Apr 10, 2013 5:09 pm
Re: ScrollBar -Set Slider position with script
Hi,
The property you are looking for is the thumbPosition
Hope this helps,
Andrew
The property you are looking for is the thumbPosition
Code: Select all
on mouseUp
set thumbPosition of scrollbar "BooksScrollBar" to 2000
end mouseUp
Andrew
Re: ScrollBar -Set Slider position with script
Andrew,
WOW!!
That works GREAT! Problem Solved!
Where could have I looked to find it out myself?
Thank You VERY MUCH,
David
WOW!!
That works GREAT! Problem Solved!

Where could have I looked to find it out myself?
Thank You VERY MUCH,
David
Re: ScrollBar -Set Slider position with script
Hi David,
Maybe stack "Controls"
Best
Klaus
here: http://www.hyperactivesw.com/revscriptc ... ences.htmlWhere could have I looked to find it out myself?
Maybe stack "Controls"

Best
Klaus
Re: ScrollBar -Set Slider position with script
Sometimes a little detective work is required. If you had looked up "scrollbar" in the dictionary, you would have found a bunch of leads. And under the "object" type, which is the most pertinent if you think about it, you would have found an example using "thumbposition". You may not have immediately know what that meant, but that is how it is done.
Pay particular attention to the "see also" section of any dictionary entry. Those links are invaluable, and often lead to what you really need.
Craig Newman
Pay particular attention to the "see also" section of any dictionary entry. Those links are invaluable, and often lead to what you really need.
Craig Newman