Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Dynamic Interactivity > Custom Interface Construction > Dialog Boxes > MessageDialog >

MessageDialog

MessageDialog[expr]
puts up a standard message dialog that displays expr together with an OK button.
MessageDialog
includes buttons with labels that evaluate the corresponding if clicked.
  • The contents expr can be text, graphics, or any other expression.
  • MessageDialog returns immediately, but the dialog it generates remains up until one of its buttons is pressed, or the dialog window is closed.
  • MessageDialog[expr] generates a dialog that includes an OK button. Pressing Enter or Esc is taken to be equivalent to pressing the OK button.
  • MessageDialog places buttons automatically, outside the area used to display expr.
  • MessageDialog by default puts up a dialog in the middle of the main display screen. Explicit settings for WindowMargins override this.
  • If Mathematica is run without a notebook front end, MessageDialog prints expr in textual form, without any buttons or other controls.
Post a message in its own window:
The message can include any kind of expression:
Post a message in its own window:
 
The message can include any kind of expression:
New in 6 | Last modified in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF