2

When ones click on the little cross in manipulate, it opens as

enter image description here

Could it be possible to keep only the set number box, and the 3 first boxes ( - > +)? If have looked to AppearanceElements but I do not think it makes to work. There is a partial answer here How to remove all buttons in Manipulate, except the input fields? but it keeps the slider.

cyrille.piatecki
  • 4,582
  • 13
  • 26

2 Answers2

4

AppearanceElements is indeed what you need:

Manipulate[x, {x, 0, 0.5, 
  AppearanceElements -> {"InputField", "StepLeftButton", 
    "PlayPauseButton", "StepRightButton"}}]

Produces:

-->

Your problem was probably that you specified AppearanceElements for the Manipulate itself rather than the Manipulator for x (which is specified by {x,...}

Update

Since the goal is to remove the slider and only leave the buttons and text box, it gets a little more complicated:

sliderLess[o : OptionsPattern[Animator]] := iSliderLess[o][##] &;
iSliderLess[o___][x_, y___] := 
 Row[{InputField[x, Number, FieldSize -> {4, 1}], Spacer[3], 
   Animator[x, y, o, 
    AppearanceElements -> {"StepLeftButton", "PlayPauseButton", 
      "StepRightButton"}, AnimationRunning -> False]}]

The idea is to take an Animator and remove everything we don't want and add a InputField in front of it.

This can be used as standalone control:

sliderLess[][Dynamic[x]]

produces:

control

Or inside Manipulate:

Manipulate[x, {{x, 0.5}, 0, 2, sliderLess[AnimationRunning -> True]}]

As you can see, you can supply options to the Animator part of the control (everything but the textbox) and variable ranges are also supported (again, only for the animator).

Lukas Lang
  • 33,963
  • 1
  • 51
  • 97
  • Mathe172, it was exactly was I was expecting after elimination of the play pause button. Unfortunately, in my case it has a weird behavior: after the box, I have not the StepleftButton, the PlayPausebutton et the SteprightButton but Animator[...] the... being all the stuff of the animator. Have an idea of the reason why? – cyrille.piatecki Aug 28 '17 at 01:57
  • You're most likely seeing the raw Animator[...] object because of some syntax error. Try to compare what you're seeing with the documentation - there is a list of all possible ways to specify the range, etc... – Lukas Lang Aug 28 '17 at 12:39
2
Manipulate[x,
{{x,0,"x"},0,1,.1,
AppearanceElements->{"InputField","StepLeftButton","PlayPauseButton","StepRightButton"}}
]

Mathematica graphics

Nasser
  • 143,286
  • 11
  • 154
  • 359
  • Nasser and Mathe172 Many Thanks, I have not found the elements "InputField","StepLeftButton","PlayPauseButton","StepRightButton" in the doc. You are near my goal which is to remove the slider. – cyrille.piatecki Aug 27 '17 at 15:08
  • @cyrille.piatecki I updated my answer based on your clarifications – Lukas Lang Aug 27 '17 at 19:47