14
$\begingroup$

I was wondering if there's a way to tell Mathematica to use the option Appearance -> "Labeled" for all Manipulate commands by default. I use this option quite often and it would be very convenient if I could set it to be the default behaviour

$\endgroup$
  • 6
    $\begingroup$ SetOptions[Manipulator, Appearance -> "Labeled"] but this works for one type of control ofc :) $\endgroup$ – Kuba Sep 22 '13 at 13:52
  • $\begingroup$ @Kuba Why don't you post that as an answer? $\endgroup$ – Mr.Wizard Sep 22 '13 at 14:27
  • $\begingroup$ @Mr.Wizard Because it isn't the answer. :) One still has to do this for Silders etc. But I will try to put more extended answer unless something very neat appear. $\endgroup$ – Kuba Sep 22 '13 at 15:13
  • $\begingroup$ @Kuba -- SetOptions seems to work for sliders. Use your code, then Manipulate[a^2, {a, 1, 10}], and you have the appearance labeled. $\endgroup$ – bill s Sep 22 '13 at 17:28
  • $\begingroup$ @bills This is Manipulator, try Manipulate[a^2, {a, 1, 10, Slider}] $\endgroup$ – Kuba Sep 22 '13 at 18:34
15
$\begingroup$

I was hesitating but it seems some people find this information useful.

SetOptions[Manipulator, Appearance -> "Labeled"];
Manipulate[{a, b, c},
           {a, 1, 10}, {b, 1, 10}, {c, 1, 10}]

enter image description here

But, still, I do not consider it the full answer. Like it is stated, it affects only Manipulator, the default control used by Manipulate for domains that are suited for slider-like controls.

Unfortunatelly, undesired behaviour appears in case of other controls. Of course not each has Appearance option, but even though Slider do, something strange happens:

SetOptions[Slider, Appearance -> "Labeled"];
Manipulate[{a, b, c},
           {a, 1, 10},
           {b, 1, 10}, 
           {c, 1, 10, Slider, Appearance -> "Labeled"}, 
           ControlType -> Slider]

enter image description here

I guess it's not something we can easily win with in general :) How can I work with SetOptions

but in this case, thanks to ybeltukov, one can use

 Manipulate[{a, b, c},
           {a, 1, 10},
           {b, 1, 10}, 
           {c, 1, 10}, 
           ControlType -> LabeledSlider]

I think that sometimes Slider is better than Manipulator, the latter gives too much control for the users of applications so the may break something :P. Quick fix that works with the method I've shown is:

SetOptions[Manipulator, Appearance -> "Labeled", AppearanceElements -> None]
$\endgroup$
  • $\begingroup$ Good enough for my vote. :-) Improve it later if you think of something better. $\endgroup$ – Mr.Wizard Sep 22 '13 at 23:35
  • $\begingroup$ @Mr.Wizard Thanks. I will if I find. I'm also looking forward to seeing some MichaelE2-style spelunking :) $\endgroup$ – Kuba Sep 22 '13 at 23:45
  • 2
    $\begingroup$ If you type ?DynamicDump`ControlToBoxes you can see exact definition DynamicDump`ControlToBoxes[Slider[BoxForm`a___,Appearance->Labeled,BoxForm`b___],BoxForm`fmt_]:=DynamicDump`ControlToBoxes[LabeledSlider[BoxForm`a,BoxForm`b],BoxForm`fmt]. Therefore Slider doesn't take into account the default options. However there is LabeledSlider! $\endgroup$ – ybeltukov Sep 22 '13 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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