Slider question

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
hamlynart
Posts: 101
Joined: Wed Mar 19, 2008 7:10 pm
Contact:

Slider question

Post by hamlynart » Sun Dec 14, 2008 1:42 am

Hi Folks,

Stupid question how do I get the state of a slider? I thought this might work:

Code: Select all

on mouseMove
  put the value of me into theData
end mouseMove

thanks in advance

Jim H

SparkOut
Posts: 2944
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Sun Dec 14, 2008 2:05 am

A slider is a form of scrollbar object, so you should check the thumbposition on scrollbarDrag

Code: Select all

on scrollbarDrag
  put the thumbPosition of me into theData
end scrollbarDrag
HTH

hamlynart
Posts: 101
Joined: Wed Mar 19, 2008 7:10 pm
Contact:

Post by hamlynart » Sun Dec 14, 2008 11:09 am

Great, Thankyou.

I should have known that, but I couldn't find any documentation or examples anywhere.

Klaus
Posts: 14191
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Sun Dec 14, 2008 12:27 pm

Hi friends,

there is a parameter that gets send with "scrollbardrag" ->tValue_or_whatever_you_name_it!

Code: Select all

on scrollbardrag tValue_or_whatever_you_name_it
  put tValue_or_whatever_you_name_it into fld 1
end scrollbardrag
:-)


Best

Klaus

SparkOut
Posts: 2944
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Sun Dec 14, 2008 3:02 pm

Oh duh! yes of course! I knew that, but... I guess I got caught by answering "in the style of the question" instead of thinking. Sorry!
(Not that it won't work, the way I said - but the syntax is nicer this way.)

Post Reply