Re: reducing the size of a Manipulate slider control, problem when using ImageSize
- To: mathgroup at smc.vnet.net
- Subject: [mg123429] Re: reducing the size of a Manipulate slider control, problem when using ImageSize
- From: Tomas Garza <tgarza10 at msn.com>
- Date: Wed, 7 Dec 2011 06:13:50 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
Hi,Perhaps this could help (using my previous code, without the Module stuff)
Column[{Style["Different size sliders in the same row", 13, "Label"], Manipulate[ Graphics[{{Line[{p1, p2, p3, p1}], Yellow, Disk[p1, 0.05]}, Style[#, Background -> White, Bold, Italic, 12, "Label"] & /@ {Text["A", p1], Text["B", p2], Text["C", p3]}}, PlotRange -> {{-0.2, 1.2}, {-0.2, 1}}, Axes -> True], Row[{Spacer[35], Control[{{p1, {0, 0}, "A"}, {0, 0}, {1, 1}, ImageSize -> 25}], Spacer[50], Control[{{p2,{1, 0}, "B"}, {0, 0}, {1, 1}, ImageSize -> 50}], Spacer[50], Control[{{p3, {0.5, 0.5}, "C"}, {0, 0}, {1, 1}, ImageSize -> 75}]}] (*Row*)] (*Manipulate*)}] (*Column*)
-Tomas
> Date: Tue, 6 Dec 2011 03:14:43 -0500
> From: cy56 at comcast.net
> Subject: Re: reducing the size of a Manipulate slider control, problem when using ImageSize
> To: mathgroup at smc.vnet.net
>
> How could I abbreviate the set of Style[ ] statements below?
>
> Block[
> {opts},
>
> Manipulate[
> opts = {Background -> White, 12, "Label"};
>
> Graphics[
> {
> {Line[{p1, p2, p3, p1}]},
>
> Style[Text["A", p1], opts],
> Style[Text["B", p2], opts],
> Style[Text["C", p3], opts]
> },
> PlotRange -> {{-0.2, 1.2}, {-0.2, 1}},
> Axes -> True,
> PlotLabel -> "Triangle points via 2D sliders"
> ],
>
> Item["2D sliders in a column", ControlPlacement -> Center],
>
> {{p1, {0, 0}}, {0, 0}, {1, 1}},
> {{p2, {0.5, 0}}, {0, 0}, {1, 1}},
> {{p3, {0, 0.5}}, {0, 0}, {1, 1}},
>
> ControlPlacement -> Left,
> FrameLabel -> {{"", ""}, {"", "Moving labelled points via 2D sliders"}}
> ]
> ]
>
> I've tried everything I can think of, but nothing seems to work.
>
> Block[
> {opts},
>
> Manipulate[
> opts = {Background -> White, 12, "Label"};
>
> Graphics[
> {
> {Line[{p1, p2, p3, p1}]},
>
> Style @@@
> Table[
> {Text[k], opts},
> {k, {{"A", p1}, {"B", p2}, {"C", p3}}}
> ]
> },
>
> PlotRange -> {{-0.2, 1.2}, {-0.2, 1}},
> Axes -> True,
> PlotLabel -> "Triangle points via 2D sliders"
> ],
>
> Item["2D sliders in a column", ControlPlacement -> Center],
>
> {{p1, {0, 0}}, {0, 0}, {1, 1}},
> {{p2, {0.5, 0}}, {0, 0}, {1, 1}},
> {{p3, {0, 0.5}}, {0, 0}, {1, 1}},
>
> ControlPlacement -> Left,
> FrameLabel -> {{"", ""}, {"", "Moving labelled points via 2D sliders"}}
> ]
> ]
>
>