MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Keep dialog input window open after button press

Am 16.05.2012 10:26, schrieb Christina:
> I have the following code which creates a button panel which links to other Mathematica scripts.
> I would like to have it such that after a button press the panel remains open and active for another button press, then only closes when the done button is pressed.
> 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[Done, DialogReturn["10"]]}]}]];
> If[menu == "1", Get["/A.m"]]
> If[menu == "2", Get["/B.m"]]

for that, don't use the modal DialogInput but just CreateDialog:

      TextCell[Row[{Style["I would like to ...", FontWeight -> Bold]}],
        Button["Run A", Get["/A.m"]],
        Button["Run B", Get["/B.m"]]
      Button["Done", DialogReturn[]]



  • Prev by Date: Crash in FindShortestPath (bug)
  • Next by Date: Re: Crash in FindShortestPath (bug)
  • Previous by thread: Keep dialog input window open after button press
  • Next by thread: Crash in FindShortestPath (bug)