slider that is only increasing?

timstudiesmath shared this question 9 years ago
Answered

Can I make a slider that the user can only move in one direction, only increasing?


Or, can I tell what direction the user moved the slider? For example, If they increase it, I'd like a box to turn blue, but if they decrease it, I'd like a box to turn red.


Thanks!


Tim

Comments (2)

photo
1

This should work in principle.


n=slider

old=1

text1="blue"


in on update script for n


SetValue[text1,If[n<old,"blue","red"]]

SetValue[old,n]


Just use SetColour instead


For increase only try


SetValue[n,If[n<old,old,n]]

SetValue[old,n]


Simon

photo
1

hello

a=0

b slider for b min:a max:a+1

for b scripting on update setvalue[a,b]

try to move b

© 2021 International GeoGebra Institute