# How to get sliders to represent lower $\leq x < y < z \leq$ upper?

Let lower and upper be fixed constants, with lower < upper.

Now, suppose that x, y, and z represent any numbers that satisfy these constraints:

$lower \leq x < y < z \leq upper$

I'm looking for a way to represent such numbers x, y, and z in a Manipulate widget.

The ideal solution would be a single slider over the range [lower, upper], and having three knobs, one for each of x, y, and z, such that each knob is free to slide over the sub-interval defined by the neighboring sliders and the bounds lower and upper.

The IntervalSlider control gets me almost there, but it has only two knobs.

Does anyone know how to do this?

How about using a different object to control some variables? It's not exactly a Manipulate control but it can have the same effect:

HorizontalGauge[Dynamic@{x, y, z}, {0, 100}]


I haven't worked out the constraining of variables but this could be a useful start.

• How about: Column[ { HorizontalGauge[Dynamic[{x, y, z}, Function[{val}, {x, y, z} = Sort[val] ] ], {0, 100} ], Dynamic[{x, y, z}]} ] Dec 16, 2016 at 16:56

A teeny modification to Smit's solution, to fit the requirements of the question:

With[{lower = 0, higher = 1},
Column[
{HorizontalGauge[Dynamic[{x, y, z},
Function[{val}, {x, y, z} = Sort[val]]], {lower, higher},
ImageSize -> 400],
Dynamic[{x, y, z}]}]
]