スライダーには以下の種類がある。
intとfloatのスライダーの違いは整数値をとるか、実数値をとるかの違いだけである。
ここではfloatSliderGrpについて使用例を示す。
window -title "slider1";
columnLayout;
text -label "make Sphere";
floatSliderGrp -label "Radius" -field true
-min 0.1 -max 20.0 -step 0.1 -value 1.0 radiusSlider;
button -label "OK"
-command "$sphereRadius = `floatSliderGrp -q -value radiusSlider`;\
sphere -r $sphereRadius";
showWindow;