I have a stand alone Manipulator
(it is not in a Manipulate
) and would like to know how to alter the style of the label. There are no explicit styling options for Manipulator
so I tried wrapping it in Style
:
Style[
Manipulator[0.5, AppearanceElements -> None,
Appearance -> {"Labeled"}, ImageSize -> Small],
FontSize -> 20]
this didn't work.
I have also noticed that I cannot set an image size other than a named size. In other words ImageSize
does not accept a number!
Manipulator[0.5, AppearanceElements -> None,
Appearance -> {"Labeled"}, ImageSize -> 100]
and
Manipulator[0.5, AppearanceElements -> None,
Appearance -> {"Labeled"}, ImageSize -> 400]
produce the same output. Are these issues possible bugs or am I overlooking something?
Q1. How can I change the font size (and other font styling but mainly font size) for the Manipulator label?
Q2. How can I make ImageSize
accept a number rather than a name?
Edit
My question is not about what alternatives exist to using Manipulator
. I have posted an example with AppearanceElements -> None
so as to make the label the sole focus. However I want the possibility of being able to add back in the AppearanceElements
is desired/required. The setting AppearanceElements -> None
obviously looks like a stand alone slider and has led to readers thinking in terms of sliders rather than "fixing" the Manipulator
.
Edit #2
In situations when no Manipulator
controls are wanted Slider
is an alternative but it also has some strange behaviour:
Framed@Slider[Dynamic[x], Appearance -> "Labeled", BaseStyle -> FontSize -> 20, ImageSize -> 100]
Framed@Slider[Dynamic[x], Appearance -> "Labeled", BaseStyle -> FontSize -> 20, ImageSize -> 200]
So it appears that the label occupies the same image size as the slider! This presents a problem in a GUI layout but there is a work around:
Framed@Pane[Slider[Dynamic[x], Appearance -> "Labeled",
BaseStyle -> FontSize -> 20, ImageSize -> 200], ImageSize -> 260]
But the image space allocated to the label looks like a bug or something unintended. This doesn't address my question but I add it here because slider answered have been given.
FWIW:
Edit #3
Tech support confirm that the strange image sizing for Slider
when a label is used is a bug.
Manipulator04
in the fileMiscExpressions.tr
in$InstallationDirectory/SystemFiles/FrontEnd/TextResources
directory may suggest an explanation for your frustrations. Basically, several parts of the elements you wish to control (such asFontSize
,InlineInputField
andInputField
sizes with option settings are hard coded inManipulator04
. The code is not too long, and perhaps, with some effort, you can modify it make your own custom manipulator and/or define your custom styledata to use as the setting forBaseStyle
... $\endgroup$If[#9,{InputFieldBox[#1, Expression,FieldSize -> {{4,10},{1,2}},Enabled -> #6,Appearance -> {"Frameless", #8},BaseStyle -> "Manipulator"]}, {}]...
But when I changed it in a text editor Mma wouldn't start up. It suggests that a stylesheet is the only way to change this. $\endgroup$Labeled[Manipulator[ Dynamic@nrDays, {0, 999, 1}], {Style[Dynamic@nrDays, 27, Bold], Style["Days: ", 23]}, {Right, Left}]
$\endgroup$