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 > CancelButton >

CancelButton

CancelButton
represents a Cancel button in a dialog that closes the dialog window when clicked.
CancelButton[action]
represents a button labeled Cancel that evaluates action when clicked.
CancelButton
uses label as the label for the button.
  • In dialogs created with DialogInput or CreateDialog, pressing Esc is effectively equivalent to clicking the Cancel button.
  • If there are several Cancel buttons in a single dialog, Esc will use the first one in the dialog.
Create dialog input and use CancelButton to cancel the action:
Create dialog input and use CancelButton to cancel the action:
In[1]:=
Click for copyable input
Out[1]=
Create a dialog with both a default button and a cancel button:
Create a dialog with a close button:
CancelButton is a special case of Button:
Create a dialog with a cancel button; the dialog is dismissed by clicking the button or pressing Esc:
Create a dialog that holds evaluations until the dialog is dismissed:
New in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF