# Creating manual sliders with ranges determined by points on other sliders

jaredwarner4 shared this question 6 days ago

I'm trying to create manual sliders (points on segments) such that the click and drag range of the points is limited by the current positions of the other points.

For simplicity and specificity, let's assume I want two sliders (vertical segments with a point on each) with range 0 to 10. Suppose the first slider represents some quantity that is always less than or equal to the quantity represented by the second slider. Therefore, if the value of the second slider were 7, then even though the first slider still shows a range from 0 to 10, the user would not be able to drag the point on the first slider past 7. Similarly, if the value of the first slider were 2, then the user would not be able to move the point on the second slider below 2.

Everything I've tried to achieve this effect involves constructing points on segments whose length is determined by other points, so that when I move these other points, the length of the segment changes, which proportionally changes the position of the point on that segment. So the points on multiple sliders move at once, instead of being able to adjust each one individually.

I hope my problem is clear. If it is not, I'm happy to provide a file. Thanks in advance!

1

I think that you can't get what you want (a slider whose values over a certain one are not selectable) automatically, I mean, you need a workaround.

Easiest way: let's say that a is the first slider (the one whose max value depends on another slider b).

What about just setting the max value for a equal to b ? (Properties window, Slider tab, Interval settings).

You can add a dynamic text saying that a is in [0,10], but the selectable values for a are <=b .

2

Hi,

with scripts : see attachment

...

1

Beautiful. Thank you so much.

2

The DynamicCoordinates() command is very powerful and can probably achieve that without scripting:https://wiki.geogebra.org/e...

1

``` So the points on multiple sliders move at once, instead of being able to adjust each one individually.
```

I hope this tricks help

Files: foro.ggb
1

A lot possibilities. Now one more.