Dynamic Slider Limits

robin.tunley shared this question 6 years ago

I have created a worksheet which calculates a number (which i call tmax) and uses a slider (T) for animation. I want tmax to be the upper limit of T's range, but tmax gets calculated based on a number of different variables in the worksheet which can be altered. It seems that even though tmax changes the limit of T does not.

Is there a way for me to make geogebra reset the upper limit of T every time tmax gets recalculated?



Comments (2)


Double-click the slider T and type "tmax" into the Max box.

But, if tmax gets its value from T, that won't work.

A much harder solution? Make a new variable, "tmax2=7". Double-click tmax and navigate to the last tab, "Scripting". In the "On Update" box, type "SetValue[tmax2, tmax]" and click "OK". Then double-click T and type tmax2 in for "Max:"


Thanks for your reply!

I have done your first suggestion and it doesn't work. tmax is defined by sliders other than T and each time they change, the max for T does not get updated; it remains whatever value it had when you typed in 'tmax' originally.

I will try your second suggestion and get back to you with the results! :)


© 2022 International GeoGebra Institute