Mathematica > Dialog Boxes >

DefaultButton

DefaultButton[]
represents an OK button that closes a dialog, and is the default when Enter is pressed in the dialog.
DefaultButton[action]
represents a button that is labeled OK, and whose action is to evaluate action.
DefaultButton[label, action]
uses label as the label for the button.
  • In dialogs created with DialogInput or CreateDialog, pressing Enter is effectively equivalent to pressing the OK button.
  • If there are several default buttons in a single dialog, Enter will use the first one in the dialog.
New in 6
© 2008 Wolfram Research, Inc. japanese.gif
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team