Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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]
share|improve this question

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer
    
I like it, it´s what iI wanted, and... for label de limits? as sensa.square7.ch/lims-vert-slider-.sna040.jpg –  Mika Ike Apr 10 at 21:34
    
@MikaIke See for example mathematica.stackexchange.com/a/5341/193 –  belisarius Apr 10 at 21:40
    
you solved me one problem, but I think you mistake the post... and this is the reply to mathematica.stackexchange.com/questions/45792/… –  Mika Ike Apr 11 at 6:16
    
How to add any similar to see the labels (customSlider[#1, " i= ", -11, 11, 1] &), to your code? –  Mika Ike Apr 11 at 8:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.