({{, (RefLink[DialogProlog, paclet:ref/DialogProlog])
is an option for (RefLink[Dialog, paclet:ref/Dialog]) that can give an expression to evaluate before the dialog starts. }})

OpenersNotesSection(Spacer1)Details

You must use a delayed rule of the form DialogProlog:>expr to prevent expr from evaluating prematurely.

Expressions given by (RefLink[DialogProlog, paclet:ref/DialogProlog]) are evaluated after symbol values are localized and before any expression given as the argument of (RefLink[Dialog, paclet:ref/Dialog]) is evaluated.

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Enter a dialog, first printing out the stack:

1+Dialog[DialogProlog:>Print[Stack[]]]

Return from the dialog:

Return[(x+y)^2]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Dialog, paclet:ref/Dialog])  ▪  (RefLink[$Epilog, paclet:ref/$Epilog])  ▪  (RefLink[DialogSymbols, paclet:ref/DialogSymbols])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Dialogs, paclet:tutorial/Dialogs])}})}})