In Mathematica one can create a Button which, when clicked, invokes an action. For example...
action[dog_] := take dog for a walk;
Button["Click here to take fido for a walk",action[fido]];
...will call the action action[fido]
when the button is clicked.
However, I cannot seem to find how to similarly invoke an action when a RadioButton has been called. For example...
action[dog_] := take dog for a walk;
RadioButton[dog,action[fido]]
...will set the value of dog to action[fido]
, not simply call the action action[fido]
like the button does. Is there a way to invoke an action when a RadioButton is clicked?