I'm new...
So lets say that I have a variable "x" that controls the x of a button. Is it possible to constantly set "x" to the scrollbar??
So if the Scrollbar, or Slider for that matter = 5, then "x" would be set to 5.
Something like
- Put Scrollbar "myScrollbar" into "x"
please help, it is highly frustrating.
setting a variable to a scrollbar
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: setting a variable to a scrollbar
I believe what you are looking for is the property "thumbPosition".
Re: setting a variable to a scrollbar
Hi STEAMlab,
1. welcome to the forum!
2. What magice said:
...
put the thumbpos of sb "your scrollbar here" into x
## NO QUOTES around x, since this is a variable!
...
3. I recommend to check these great stacks to get the basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html
Best
Klaus
1. welcome to the forum!
2. What magice said:
...
put the thumbpos of sb "your scrollbar here" into x
## NO QUOTES around x, since this is a variable!
...
3. I recommend to check these great stacks to get the basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html
Best
Klaus
Re: setting a variable to a scrollbar
Also check scrollbardrag as in
Code: Select all
on scrollbardrag tCurrentThumbPos
put tCurrentThumbPos --or do something useful with it
end scrollbardrag