- #1
ChristinaJ
Gold Member
- 35
- 1
All,
I have a button panel (code below) where a pressed button initiates a particular Mathematica script.
When the button is pressed the script runs (as it should) but the panel closes. I wish for the panel to remain open so that I can click another button. The panel should close only when the done button is clicked.
Any help appreciated.
Many thanks,
Christina
I have a button panel (code below) where a pressed button initiates a particular Mathematica script.
When the button is pressed the script runs (as it should) but the panel closes. I wish for the panel to remain open so that I can click another button. The panel should close only when the done button is clicked.
Code:
menu = DialogInput[
DialogNotebook[{Column[{TextCell[
Row[{Style["I would like to ...", FontWeight -> Bold]}],
"Text"],
Row[{Button["Run A", DialogReturn["1"]],
Button["Run B", DialogReturn["2"]],
Button["Run C", DialogReturn["3"]]}],
Button[Done, DialogReturn[]]}]}]];
If[Mags == "1",
Get["A.m"]]
If[Mags == "2",
Get["B.m"]]
If[Mags == "3",
Get["C.m"]]
Any help appreciated.
Many thanks,
Christina