开发者

Style dynamic value

Can I a开发者_JS百科pply Style to the output of "Labeled" in the below ?

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

That is on the right part of the Slider :

Style dynamic value


You want the option BaseStyle (which appears in Options[Slider]). E.g.

Manipulate[
 Plot[Cos[k x], {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"}}]

Style dynamic value

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


It seems to be at least partially affected by LabelStyle and BaseStyle. (I'm having trouble changing the font, for some reason, but size, weight, color seem to work fine.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜