Re: reducing the size of a Manipulate slider control, problem when using ImageSize
- To: mathgroup at smc.vnet.net
- Subject: [mg123435] Re: reducing the size of a Manipulate slider control, problem when using ImageSize
- From: Bob Hanlon <hanlonr357 at gmail.com>
- Date: Wed, 7 Dec 2011 06:14:56 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
Inner[ Style[Text[#1, #2], opts] &, {"A", "B", "C"}, {p1, p2, p3}, List] {Style[Text["A", p1], opts], Style[Text["B", p2], opts], Style[Text["C", p3], opts]} Style[Text[#[[1]], #[[2]]], opts] & /@ Thread[{{"A", "B", "C"}, {p1, p2, p3}}] {Style[Text["A", p1], opts], Style[Text["B", p2], opts], Style[Text["C", p3], opts]} Style[Text[#[[1]], #[[2]]], opts] & /@ {{"A", p1}, {"B", p2}, {"C", p3}} {Style[Text["A", p1], opts], Style[Text["B", p2], opts], Style[Text["C", p3], opts]} Style[Text[Sequence @@ #], opts] & /@ {{"A", p1}, {"B", p2}, {"C", p3}} {Style[Text["A", p1], opts], Style[Text["B", p2], opts], Style[Text["C", p3], opts]} % ==== %% ==== %%% ==== %%%% True Bb Hanlon On Tue, Dec 6, 2011 at 3:14 AM, Chris Young <cy56 at comcast.net> wrote: > 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"}= } > ] > ] >