This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

DialogReturn

DialogReturn[expr]
closes a dialog window, returning the expression expr from the dialog.
DialogReturn
closes a dialog window, returning Null.
Put up a dialog window that returns when the button is clicked:
Put up a dialog window that returns when the button is clicked:
In[2]:=
Click for copyable input
Out[2]=
 
In[2]:=
Click for copyable input
Out[2]//FullForm=
Create a dialog input window that returns a user input:
Enter a string in the field and click Proceed to return the string:
This input puts up a dialog window and does not wait for a return value:
Typing in the dialog window dynamically changes but has no immediate effect on :
The kernel evaluates other inputs while the dialog window is open:
After the Proceed button is clicked, the effect of DialogReturn can be seen:
Return different values, depending which button is clicked:
This uses DialogReturn to return from the dialog notebook:
DefaultButton can be used instead of an explicit DialogReturn:
CancelButton implicitly uses DialogReturn:
New in 6