1
$\begingroup$

I am new using mathematica so I would really appreciate your help. I want to open this dialog:

CreateDialog[Column[{"Type A and B",Grid[{{"A:",InputField[Dynamic[A],Number]},{"B:",InputField[Dynamic[B],Number]},{CancelButton[],DefaultButton[]}},Spacings->{1,Automatic},Alignment->Left]}],Modal->True]

And after the user types A and B, I want to open this one:

Grid1={{"Item","Info","-"}};
For[i=1,i<=A,i++,AppendTo[Grid1,{"A" <> ToString[i],InputField[],Checkbox[]}]]
CreateDialog[Column[{Grid[Grid1],Row[{CancelButton[],DefaultButton[]}]}],Modal->True]

And then a third one and so on, the problem is, these dialogs open simultaneously, and I want the second one to open after ok or cancel button is pressed in the first one, and so on. How can I achieve this? Thank you very much for your help

$\endgroup$
  • 1
    $\begingroup$ Try DialogInput rather than CreateDialog. $\endgroup$ – Rohit Namjoshi Feb 2 '19 at 2:30
  • $\begingroup$ Thank you, it worked! $\endgroup$ – Lindsey Feb 2 '19 at 2:45