-2

I like this, but.. .. how could I put the labels to know +- over where value I are moving?

for examples, between 0 and 8.

 Manipulate[{u*v}, Row[{Control[{u, 0, 1}], Control[{v, 0, 1}]}], 
  ControlType -> VerticalSlider, ControlPlacement -> Up]
Mika Ike
  • 3,241
  • 1
  • 23
  • 38

1 Answers1

3

You may try:

Manipulate[If[a == a, ToExpression[ToString@u <> s <> ToString@v]],
           Row[{Control[{u, 0., 1., VerticalSlider}],
                Control[{v, 0., 1., VerticalSlider}],
                Column[{Control[{s, {"+", "-", "*", "/"}, Setter}], 
                        Button["Calc", a = ! a]}]}], 
           Initialization -> (a = True), 
           TrackedSymbols :> {a}]

Mathematica graphics

Edit

More on that:

ValueThumbSlider[v_] := ValueThumbSlider[v, {0, 1}];
ValueThumbSlider[Dynamic[var_], {min_, max_}] := 
 LocatorPane[
  Dynamic[If[! NumberQ[var], var = min]; {0, var}, (var = Last[#]) &],
  Graphics[{AbsoluteThickness[1.5], Line[{{0, min}, {0, max}}],
    Dynamic[{Text[var, {1.5, var}, {0, -1}], 
      Polygon[{Offset[{0, 0}, {0, var}], Offset[{-5, -5}, {0, var}], 
        Offset[{-5, 5}, {0, var}]}]}]},
   ImageSize -> {30, 300}, PlotRange -> {{-1, 1}, {min, max}},
   PlotRangePadding -> {{Automatic, 1}, None},
   AspectRatio -> 10, Axes -> {False, True}, 
   Ticks -> {None, {min, max}}],
  {{0, min}, {0, max}}, Appearance -> None]; Panel@
 DynamicModule[{x, y, s}, 
  Column[{Row[{ValueThumbSlider[Dynamic@x], 
      ValueThumbSlider[Dynamic@y], 
      Column[{SetterBar[Dynamic@s, {"+", "-", "*", "/"}]}]}], 
    Dynamic@ToExpression[ToString@x <> ToString@s <> ToString@y]}]]

Mathematica graphics

Dr. belisarius
  • 115,881
  • 13
  • 203
  • 453
  • I like it, it´s what iI wanted, and... for label de limits? as http://sensa.square7.ch/lims-vert-slider-.sna040.jpg – Mika Ike Apr 10 '14 at 21:34
  • @MikaIke See for example http://mathematica.stackexchange.com/a/5341/193 – Dr. belisarius Apr 10 '14 at 21:40
  • you solved me one problem, but I think you mistake the post... and this is the reply to http://mathematica.stackexchange.com/questions/45792/how-to-make-3-parameters-selection-and-then-execute-and-not-with-each-selection/45817?noredirect=1#45817 – Mika Ike Apr 11 '14 at 06:16
  • How to add any similar to see the labels

    (customSlider[#1, " i= ", -11, 11, 1] &),

    to your code?

    – Mika Ike Apr 11 '14 at 08:03