# How to remove all buttons in Manipulate, except the input fields?

By default, when you click the small "+" symbol, at the right of a slider (in Manipulate and Animate), you get an input field and several buttons (play, pause, etc). How do you remove all buttons for all the sliders in a Manipulate box, except the input fields ?

The documentation isn't obvious at all for customization like this, and searching the site didn't helped much. Sorry if I missed something related.

• So you want the slider AND the input field? If you can get by without the input field and work just with the slider, you could use ControlType -> Slider. – MarcoB Mar 13 '16 at 1:40
• @MarcoB, I still need the input field for values that are hard to select with a slider. – Cham Mar 13 '16 at 1:50
• Related: (28768). – MarcoB Mar 13 '16 at 2:07
• Manipulate[ Plot[Sin[x (1 + a x)], {x, 0, 6}], {a, 0, 6, AppearanceElements -> {"InputField", "Slider"}}] ? – Basheer Algohi Mar 13 '16 at 2:27
• @Algohi, nice ! This is working ! Is there a way to define these options "globaly" inside the Manipulate code, without having to add these options to each slider separately ? – Cham Mar 13 '16 at 2:35

With[{maniOpts = Sequence[
Appearance -> {"Labeled", "Open"},
AppearanceElements -> {"InputField", "Slider"}, ImageSize -> Large
]
},
Manipulate[
Plot[Sin[x (1 + a x)]/b, {x, 0, 6}],
{a, 0, 6, maniOpts},
{b, 1, 5,  1, maniOpts}]
]


This is what I do in similar cases.

• Why the With ? I tried using just maniOpts = Sequence[ Appearance -> {"Labeled", "Open"}, AppearanceElements -> {"InputField", "Slider"}, ImageSize -> Large ];, and it's working great, apparently after a first try. – Cham Mar 13 '16 at 14:29
• @Cham Manipulate is meant to work across MMA sessions, so if you are not including maniOpts inside or injecting those options directly, maniOpts will be forgotten when you open this cdf/notebook in fresh session. So maybe it's not necessary but I do this from habit. – Kuba Mar 13 '16 at 14:39
• I'm not sure to understand. These options are defined only for this particular Manipulate box. If I close this notebook or if I open another nootebook with another Manipulate, it is normal that everything is forgotten by MMA. Compiling a given code would erase all the previous definitions, since I use Clear["Global*"] at the beginning of all of my projects. Well, this is the way I work with MMA. Maybe this isn't ideal ? Is there a potential conflict/problem I'm not aware of, with this method ? – Cham Mar 13 '16 at 14:45
• @Cham Manipulate is HoldAll so if you just put there GlobalmaniOpts its definition won't be found when you open notebook in fresh session, unless you evaluate whole notebook but the point is to have self contained Manipulate output. You can read more about related things in reference.wolfram.com/language/tutorial/…, especially on FE ownership of DynamicModule variables. – Kuba Mar 13 '16 at 16:13
• Kuba, the document you linked cannot be found. – Cham Mar 13 '16 at 16:18

Manipulate[
a b c d,
Grid[{
{Labeled[Slider[Dynamic[a], {0, 100}], "a =", Left],
InputField[Dynamic[a], ImageSize -> Tiny]},
{Labeled[Slider[Dynamic[b], {-50, 50}], "b =", Left],
InputField[Dynamic[b], ImageSize -> Tiny]},
{Labeled[Slider[Dynamic[c], {-10, 30}], "c =", Left],
InputField[Dynamic[c], ImageSize -> Tiny]},
{Labeled[Slider[Dynamic[d], {0, 1}], "d =", Left],
InputField[Dynamic[d], ImageSize -> Tiny]}
}]
]


• The InputField would replace the slider's label. This is fine. These elements would be placed inside a Row directive to make a line. But how do you place several of them (Slider + InputField) on top of each other ? – Cham Mar 13 '16 at 2:28
• @Cham Yes, you can arrange their position as you wish using e.g. Row. But what do you mean by on top of each other? – MarcoB Mar 13 '16 at 2:32
• I mean a vertical stack of standard sliders (as what is done by default), but each one having its Input field on their right using Row. – Cham Mar 13 '16 at 2:37
• @Cham Take a look at the new version of my answer. – MarcoB Mar 13 '16 at 2:52
• It's all working great ! I prefer Algohi's settings, since it's making my code much simpler and easier to understand. Both answers are good, though. Thanks a lot ! – Cham Mar 13 '16 at 2:59

If you are okay with a general setting, you can do it like this:

SetOptions[Manipulator, AppearanceElements -> {"InputField", "Slider"}];
Manipulate[Plot[Sin[x (1 + a x)], {x, 0, 6}], {a, 0, 6}]


You can either save the options and return them back:

saveoption = Options[Manipulator];
SetOptions[Manipulator, saveoption];


Or you can use ParallelEvaluate to get fresh kernel:

SetOptions[Manipulator, First@ParallelEvaluate[Options[Manipulator]]]


Or as J. M. mentioned, use:

SetOptions[Manipulate, AppearanceElements -> Automatic]


• Very nice ! This would simplify my code a lot, with ImageSize -> Large, Appearance -> {"Labeled", "Closed"}, added to the SetOptions. Can this SetOptions be reset using Clear["Global*"] ? – Cham Mar 13 '16 at 2:50
• @Cham, use SetOptions[Manipulate, AppearanceElements -> Automatic] to reset back to the default. – J. M.'s torpor Mar 13 '16 at 2:55
• Aw, I see that it's also resetting all the other Manipulate codes I've done. So this cannot be set locally, for a given Manipulate ? Do I have to add SetOptions[Manipulate, AppearanceElements -> Automatic] to all of my other Manipulate codes ? – Cham Mar 13 '16 at 3:02
• @Cham, just append the options if you only want it to apply to a single Manipulate[]: Manipulate[(* stuff *), Appearance -> {"Labeled", "Closed"}, AppearanceElements -> {"InputField", "Slider"}, ImageSize -> Large]`. – J. M.'s torpor Mar 13 '16 at 3:09
• It appears to work, but Appearance and ImageSize are shown in red in my code ! The compilation appears to be normal, and no warning/error messages. ?? – Cham Mar 13 '16 at 3:13