RadioButton Question
- To: mathgroup at smc.vnet.net
- Subject: [mg91079] RadioButton Question
- From: Chris Degnen <degnen at cwgsy.net>
- Date: Tue, 5 Aug 2008 04:04:31 -0400 (EDT)
Hi, Can anyone suggest how I can get some radio buttons to run functions, rather than just set a variable? This is a statement to create two buttons that set a value:- RadioButtonBar[Dynamic[state], {"Existing", "New"}] The following code runs functions, but also shows the buttons in a list, along with some output. Any suggestions how I can achieve this functionality but with only the buttons and labels showing, as above? dofunction1[] := x = 1; dofunction2[] := x = 2; Module[{state = "Existing"}, {RadioButtonBar[Dynamic[state], {"Existing", "New"}], Dynamic[If[state == "Existing", dofunction1[], dofunction2[]]]}]
- Follow-Ups:
- Re: RadioButton Question
- From: "Namrata Khemka" <namrata.khemka@gmail.com>
- Re: RadioButton Question