Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Hide a PopupMenu in Manipulate' topicStudent Support Forum > General > Archives > "Hide a PopupMenu in Manipulate"

Next Comment >Help | Reply To Topic
Author Comment/Response
Patrick
03/20/08 2:25pm

Hello,
I just started using mathematica. My problem is the following: I have a circle and the user should decide, what color this circle should have:
-----------------------------------------------------
Manipulate[
Graphics[
{If[color, {color1, Disk[]}, Circle[]]}

], {{color, False, "Color"}, {False, True}},
{{color1, Blue, "Color1"}, {Blue -> "Blue", Green -> "Green"}}
]
-----------------------------------------------------

But I want, that the PopupMenu is only shown, if the Checkbox is clicked.
I tried
------------------------------------------
Manipulate[
Graphics[
{If[color, {color1, Disk[]}, Circle[]]}

], {{color, False, "Color"}, {False, True}},
If[color, {{color1, Blue, "Color1"}, {Blue -> "Blue",
Green -> "Green"}}]
]
-------------------------
but this does not work.

Is there any way to hide the PopupMenu until the Checkbox was clicked?

I would be very glad, if someone could give me his advice me.

Thank you

URL: ,

Subject (listing for 'Hide a PopupMenu in Manipulate')
Author Date Posted
Hide a PopupMenu in Manipulate Patrick 03/20/08 2:25pm
More detail from original poster Patrick 03/22/08 3:55pm
Next Comment >Help | Reply To Topic