MathGroup Archive 2008

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

Search the Archive

Hide a PopupMenu in Manipulate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg86890] Hide a PopupMenu in Manipulate
  • From: Patrick Klitzke <philologos14 at gmx.de>
  • Date: Tue, 25 Mar 2008 01:16:57 -0500 (EST)

Hello, this is my first question in MathGroub and I hope I send it to 
the rigth email adress. I have just began learning Mathematica. I could 
not find the solution to the following problem:
I have made a circle  and the user should decide, whether the circle 
should have a color. If it should,
three PopupMenus should be shown, but when the checkbox is not clicked, 
they should not be shown:
-----------------------------------------------------------------------------
(*Code: *)
Manipulate[
 Graphics[
  {
If[
color,
{typ = PopupMenu;
color1, Disk[]
},
{typ = None;
     Circle[] }  
]}
   ],
{{color, False, "Color"}, {False, True}},
 {{color1, Blue, "Color1"},
 {Blue -> "Blue", Green -> "Green"},
  ControlType -> typ}
 ]
---------------------------------------------------------------------------
But as you can see, you have to recompile it in order to see the changes.
Is there any way to do so, without recompiling the code?

Thank you.

Patrick Klitzke

email:philologos14 at gmx.de



  • Prev by Date: Re: Counting nonzeros
  • Next by Date: Importing text files
  • Previous by thread: Re: Match Pairs of Numbers
  • Next by thread: Re: Hide a PopupMenu in Manipulate