setting a variable to a scrollbar

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
STEAMLab
Posts: 1
Joined: Mon Feb 23, 2015 5:18 pm

setting a variable to a scrollbar

Post 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:
magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Re: setting a variable to a scrollbar

Post by magice »

I believe what you are looking for is the property "thumbPosition".
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: setting a variable to a scrollbar

Post 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
SparkOut
Posts: 2984
Joined: Sun Sep 23, 2007 4:58 pm

Re: setting a variable to a scrollbar

Post by SparkOut »

Also check scrollbardrag as in

Code: Select all

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