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 » Mon Feb 23, 2015 6:06 pm

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 » Mon Feb 23, 2015 6:10 pm

I believe what you are looking for is the property "thumbPosition".

Klaus
Posts: 13814
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: setting a variable to a scrollbar

Post by Klaus » Mon Feb 23, 2015 6:27 pm

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: 2846
Joined: Sun Sep 23, 2007 4:58 pm

Re: setting a variable to a scrollbar

Post by SparkOut » Mon Feb 23, 2015 10:24 pm

Also check scrollbardrag as in

Code: Select all

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

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”