({{, (RefLink[MessageDialog, paclet:ref/MessageDialog])[expr] 
puts up a standard message dialog that displays expr together with an OK button.}, {, (RefLink[MessageDialog, paclet:ref/MessageDialog])[expr,{(Subscript[lbl, 1]):>(Subscript[act, 1]),(Subscript[lbl, 2]):>(Subscript[act, 2]),…}]
includes buttons with labels (Subscript[lbl, i]) that evaluate the corresponding (Subscript[act, i]) if clicked.}})

OpenersNotesSection(Spacer1)Details and Options

The contents expr can be text, graphics, or any other expression.

(RefLink[MessageDialog, paclet:ref/MessageDialog]) returns immediately, but the dialog it generates remains up until one of its buttons is pressed, or the dialog window is closed.

(RefLink[MessageDialog, paclet:ref/MessageDialog])[expr] generates a dialog that includes an OK button. Pressing (Key0[MacOSXreturnenter]) or (Key0[esc]) is taken to be equivalent to pressing the OK button.

(RefLink[MessageDialog, paclet:ref/MessageDialog]) places buttons automatically, outside the area used to display expr.

(RefLink[MessageDialog, paclet:ref/MessageDialog]) by default puts up a notebook with a typical message dialog appearance. The option settings include (RefLink[WindowFloating, paclet:ref/WindowFloating])->(RefLink[False, paclet:ref/False]), (RefLink[WindowSize, paclet:ref/WindowSize])->(RefLink[All, paclet:ref/All]), and (RefLink[WindowTitle, paclet:ref/WindowTitle])->(RefLink[None, paclet:ref/None]).

(RefLink[MessageDialog, paclet:ref/MessageDialog]) by default puts up a dialog in the middle of the main display screen. Explicit settings for (RefLink[WindowMargins, paclet:ref/WindowMargins]) override this.

(RefLink[MessageDialog, paclet:ref/MessageDialog]) returns a (RefLink[NotebookObject, paclet:ref/NotebookObject]) corresponding to the notebook it creates.

If the Wolfram System is run without a notebook front end, (RefLink[MessageDialog, paclet:ref/MessageDialog])[expr,…] prints expr in textual form, without any buttons or other controls.

OpenersPrimaryExamplesSection(Spacer1)Examples  (2)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Post a message in its own window:

MessageDialog["text"];

The message can include any kind of expression:

MessageDialog[{(x^3),Graphics[Disk[],ImageSize->Tiny]}];

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ChoiceDialog, paclet:ref/ChoiceDialog])  ▪  (RefLink[CreateDialog, paclet:ref/CreateDialog])  ▪  (RefLink[Message, paclet:ref/Message])  ▪  (RefLink[Print, paclet:ref/Print])  ▪  (RefLink[Beep, paclet:ref/Beep])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Creating Dialog Boxes, paclet:tutorial/CreatingDialogBoxes])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Dialog Boxes, paclet:guide/DialogBoxes])}, {▪(RefLinkPlain[Custom Interface Construction, paclet:guide/CustomInterfaceConstruction])}, {▪(RefLinkPlain[Messages, paclet:guide/Messages])}, {▪(RefLinkPlain[Setting Up User Interactions, paclet:guide/SettingUpUserInteractions])}})}})