This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

CancelButton

CancelButton[]
represents a Cancel button in a dialog that closes the dialog window when pressed.
CancelButton[action]
represents a button labeled Cancel that evaluates action when pressed.
CancelButton[label, action]
uses label as the label for the button.
  • In dialogs created with DialogInput or CreateDialog, pressing Esc is effectively equivalent to pressing the Cancel button.
  • If there are several Cancel buttons in a single dialog, Esc will use the first one in the dialog.
New in 6