|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
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.
Details and OptionsDetails and Options
- DefaultButton[] is equivalent to DefaultButton[DialogReturn[]].
- In dialogs created with DialogInput or CreateDialog, pressing Enter is effectively equivalent to clicking the OK button.
- If there are several default buttons in a single dialog, Enter will use the first one in the dialog.
- DefaultButton has the same options as Button.
ExamplesExamplesopen allclose all
Basic Examples (1)Basic Examples (1)
Create dialog input, and use DefaultButton to dismiss dialog:
New in 6
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
