Page 1 of 1

setting a variable to a scrollbar

Posted: Mon Feb 23, 2015 6:06 pm
by STEAMLab
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. :cry:

Re: setting a variable to a scrollbar

Posted: Mon Feb 23, 2015 6:10 pm
by magice
I believe what you are looking for is the property "thumbPosition".

Re: setting a variable to a scrollbar

Posted: Mon Feb 23, 2015 6:27 pm
by Klaus
Hi STEAMlab,

1. welcome to the forum! :D

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

Posted: Mon Feb 23, 2015 10:24 pm
by SparkOut
Also check scrollbardrag as in

Code: Select all

on scrollbardrag tCurrentThumbPos
   put tCurrentThumbPos --or do something useful with it
end scrollbardrag