Re: Custom label for a slider in Manipulate
- To: mathgroup at smc.vnet.net
- Subject: [mg96431] Re: Custom label for a slider in Manipulate
- From: Yves Klett <yves.klett at googlemail.com>
- Date: Fri, 13 Feb 2009 03:45:24 -0500 (EST)
- References: <gmu90d$grj$1@smc.vnet.net>
Damon,
in Version 7 there is the very useful Control[] wrapper. I find it
useful for interface layout, because you can use controls e.g. in a Grid:
Manipulate[
Plot[Sqrt[2]/(RTT*Sqrt[p]), {p, .001, .1},
PlotRange -> {{0, .1}, {0, 150}}],
Grid[{{Control[{{RTT, .1, "round trip time"}, .03, .25}],
Dynamic[NumberForm[RTT, {3, 4}]], "ms"}}]]
Regards,
Yves
Damon schrieb:
> I have a simple Manipulate,
>
> Manipulate[
> Plot[Sqrt[2]/(RTT*Sqrt[p]), {p, .001, .1},
> PlotRange -> {{0, .1}, {0, 150}}],
> {{RTT, .1, "round trip time"}, .03, .25, Appearance -> "Labeled"}
> ]
>
> But I want the slider that controls the RTT variable to have a
> prettier appearance. I would like it to display the value to the right
> of the control, but instead of a plain number I want it to show
> ToString[Round[1000 RTT]] <> "ms"
>
> How can I achieve this?
>
> Thanks,
> Damon.
>