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.

By default Manipulator produced by Manipulate with Appearance -> "Open" option have two rows: on the first row the slider is placed, on the second other controls:

Manipulate[
 Row[{Plot[Sin[x (1 + a x)], {x, 0, 6}], 
      Plot[Evaluate@D[Sin[x (1 + a x)], x], {x, 0, 6}]
     }, BaseStyle -> ImageSizeMultipliers -> 2/3], 
 {a, 0, 2, Appearance -> "Open"}]

screenshot

How can I get all the controls placed on one row?

share|improve this question
1  
Don't know of an option to Manipulator. Perhaps place them individually? (E.g. Row[{Slider[Dynamic[foo]], InputField[Dynamic[foo], FieldSize -> Tiny], Animator[Dynamic[foo], AnimationRunning -> False, AppearanceElements -> {"StepLeftButton", "StepRightButton", "PlayPauseButton", "FasterSlowerButtons", "DirectionButton"}]}, Spacer[1]] –  Michael E2 Nov 19 '13 at 17:14
    
there is no option build-in for this. You try @MichaelE2 method above, that would be the best solution. May be suggestion should be send to support@wolfram.com for this. I wanted to do this once and found no direct way. –  Nasser Nov 21 '13 at 4:46
add comment

2 Answers

up vote 5 down vote accepted

Following suggestions in the comments, here is a way to achieve what I want:

Manipulate[
 Row[{
   Plot[Sin[x (1 + a x)], {x, 0, 6}],
   Plot[Evaluate@D[Sin[x (1 + a x)], x], {x, 0, 6}]},
               BaseStyle -> ImageSizeMultipliers -> 2/3],
 {a, 0, 2,
  Grid[{{
         Slider[##, Appearance -> Tiny], 
         InputField[#, FieldSize -> Tiny], 
         Animator[##, AnimationRunning -> False, 
          AppearanceElements -> {"StepLeftButton", "StepRightButton", 
           "PlayPauseButton", "FasterSlowerButtons", "DirectionButton"}]
       }},
          Alignment -> {Center, Center}] &}]

screenshot

share|improve this answer
    
You probably want Slider[##, Appearance -> Tiny] -- Manipulate passes the domain as a second argument, (0, 2} in your example. –  Michael E2 Nov 21 '13 at 12:27
    
@Michael Thanks, I have corrected my answer. But it does not solve the problem with InputField positioning. –  Alexey Popkov Nov 21 '13 at 13:33
1  
Do you mean vertical alignment? Try Grid[{{..}}, Alignment -> {Center, Center}] &. Also set InputField[#, ImageSize -> {60, 15}] to get a better match. Cribbed from SystemFiles/FrontEnd/TextResources/MiscExpressions.tr (look for "Manipulator04"). –  Michael E2 Nov 21 '13 at 18:05
    
@Michael Thanks, I think the problem is solved (a bit strange that it was so hard, btw). If you wish you can post it as an answer and I'll accept it and delete mine. Or I just leave everything as is. –  Alexey Popkov Nov 22 '13 at 0:21
    
Oh, I have enough rep and not enough time, so let's leave it as it is. Thanks, anyway! :) –  Michael E2 Nov 22 '13 at 0:35
show 2 more comments

Have a look, if this will be better:

    Manipulate[
 Row[{Plot[Sin[x (1 + a x)], {x, 0, 6}], 
   Plot[Evaluate@D[Sin[x (1 + a x)], x], {x, 0, 6}]}, 
  BaseStyle -> ImageSizeMultipliers -> 2/3], {a, 0, 2, 
  Row[{Slider[#, ImageSize -> {200, 20}], 
     InputField[#, ImageSize -> {50, 17}], 
     Animator[#, AnimationRunning -> False, 
      AppearanceElements -> {"StepLeftButton", "StepRightButton", 
        "PlayPauseButton", "FasterSlowerButtons", 
        "DirectionButton"}]}, Spacer[1], 
    BaselinePosition -> Center] &}]

enter image description here

share|improve this answer
    
Unfortunately your code produces worse output in Mathematica 8.0.4 under Windows 7 x64 than the code in my answer. –  Alexey Popkov Nov 21 '13 at 13:31
    
@AlexeyPopkov are your names different or what is the reason of i and y at the and? :) –  Kuba Nov 21 '13 at 13:50
    
@Kuba My first name is Alexey. If you see the name "Alexei" somewhere, it is someone else. :) –  Alexey Popkov Nov 21 '13 at 17:57
    
@Kuba The names are of the same origin. The way they are written reflects the madness of the Russian Foreign Office inventing, re-inventing and re-re-inventing rules of how to write our names as well as a personal luck. I suggest you distinguish us by the family names. –  Alexei Boulbitch Nov 22 '13 at 9:02
add comment

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.