How to generate the final result of variable definitions in
- To: mathgroup at smc.vnet.net
- Subject: [mg122501] How to generate the final result of variable definitions in
- From: Mark <big.dog1 at att.net>
- Date: Sun, 30 Oct 2011 04:22:47 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
Hello. I am new to Mathematica and currently learning its syntax.
The below commands generate a rectangle, circle and radio button bar control.
My question is how do I encorporate the below commands to get a window area showing the radio button bar so that when you press one of the buttons it will draw the appropriate shape.
I understand that an "If" command is needed but do not know what to put all this in to get the final result.
Many thanks in advance
----------------------------------------
box = Graphics[{Thick, Green, Rectangle[{0, -1}, {2, 1}]}];(*Rectangle definition*)
oval = Graphics[{Red, Disk[]}];(*Circle definition*)
shape1 = Row[{"Shape Type: ", Control[{{bt, 1}, {1 -> " Rectangle ", 2 -> " Circle "}, ControlType -> RadioButtonBar}]}];(*Radio button bar definition*)