MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: reducing the size of a Manipulate slider control, problem when using ImageSize

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123421] Re: reducing the size of a Manipulate slider control, problem when using ImageSize
  • From: Chris Young <cy56 at comcast.net>
  • Date: Tue, 6 Dec 2011 03:14:43 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <fbj3ae$noj$1@smc.vnet.net> <jbi6j5$532$1@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"}}
  ]
 ]




  • Prev by Date: Re: Area of two intersecting circles
  • Next by Date: Re: Need help integrating Wolfram Alpha data in Mathematica
  • Previous by thread: Re: reducing the size of a Manipulate slider control, problem when using ImageSize
  • Next by thread: Re: reducing the size of a Manipulate slider control, problem when using ImageSize