Dynamic style value

Can I apply a style to the Label output below?

Manipulate[\[Lambda], Control@ {{\[Lambda], 401, Style[" \[Lambda]", Black, Bold, 24]}, Range[401, 570, 1], ControlType -> Slider, ControlPlacement -> Bottom, Appearance -> "Labeled", ImageSize -> 200}] 

This is on the right side of the slider:

enter image description here

+7
source share
2 answers

You need the BaseStyle option (which appears in Options[Slider] ). For example.

 Manipulate[ Plot[Cos[kx], {x, 0, 2 Pi}, PlotLabel -> "Cosine"], {{k, 1, Style["x", Black, Bold, 24]}, 0, 4, ControlType -> Slider, Appearance -> "Labeled", ControlPlacement -> Bottom, ImageSize -> 200, BaseStyle -> {Red, Large, Italic, FontFamily -> "Times"}}] 

cosine

Looking at this, I noticed that you can also use the almost undocumented ControlType -> LabeledSlider , just for something else.

+10
source

This seems to be at least partially dependent on LabelStyle and BaseStyle . (I have problems with changing the font, for some reason, but the size, weight, color seem to work fine.)

+2
source

All Articles