Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mathematica: Dialog button window to remain open after click

  1. May 15, 2012 #1

    ChristinaJ

    User Avatar
    Gold Member

    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.

    Code (Text):
    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
     
  2. jcsd
  3. May 21, 2012 #2

    ChristinaJ

    User Avatar
    Gold Member

    Re: Mathematica: Dialog button window to remain open after click [SOLVED]

    Solved here thanks to comp.soft-sys.math.mathematica
     
    Last edited: May 21, 2012
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Mathematica: Dialog button window to remain open after click
Loading...