1
$\begingroup$

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.

$\endgroup$

marked as duplicate by Kuba Aug 27 '17 at 12:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Kuba, I have updated the question $\endgroup$ – cyrille.piatecki Aug 28 '17 at 2:03
3
$\begingroup$

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).

$\endgroup$
  • $\begingroup$ 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? $\endgroup$ – cyrille.piatecki Aug 28 '17 at 1:57
  • $\begingroup$ 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... $\endgroup$ – Lukas Lang Aug 28 '17 at 12:39
2
$\begingroup$
Manipulate[x,
{{x,0,"x"},0,1,.1,
AppearanceElements->{"InputField","StepLeftButton","PlayPauseButton","StepRightButton"}}
]

Mathematica graphics

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – cyrille.piatecki Aug 27 '17 at 15:08
  • $\begingroup$ @cyrille.piatecki I updated my answer based on your clarifications $\endgroup$ – Lukas Lang Aug 27 '17 at 19:47

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