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[label,action]
uses label as the label for the button.
Details and Options

- CancelButton[] is equivalent to CancelButton[DialogReturn[$Canceled]].
- In dialogs created with DialogInput or CreateDialog, pressing
is effectively equivalent to clicking the Cancel button.
- If there are several Cancel buttons in a single dialog,
will use the first one in the dialog.
- CancelButton has the same options as Button.
-
Alignment Automatic how to align contents within the button Appearance Automatic the overall appearance of the button AutoAction False whether to click the button automatically when the mouse is over it Background Automatic button background color BaselinePosition Automatic alignment relative to surrounding text BaseStyle "GenericButton" base style specifications for the button ContentPadding True whether to shrink the margins tightly around the contents Enabled Automatic whether the button is enabled or grayed out Evaluator Automatic the kernel in which to evaluate expr FrameMargins Automatic minimum margins to leave inside the frame ImageMargins 0 margins around the image of the displayed button ImageSize Full the overall image size of the displayed button Method "Preemptive" the evaluation method to use Tooltip None the tooltip for the button TooltipDelay 0.` how long to delay before displaying the tooltip TooltipStyle {} style specifications for the tooltip
List of all options

Examples
open allclose allBasic Examples (1)
Create dialog input and use CancelButton to cancel the action:
Applications (2)
Properties & Relations (3)
CancelButton is a special case of Button:
Create a dialog with a cancel button; the dialog is dismissed by clicking the button or pressing :
Create a dialog that holds evaluations until the dialog is dismissed:
Text
Wolfram Research (2007), CancelButton, Wolfram Language function, https://reference.wolfram.com/language/ref/CancelButton.html.
CMS
Wolfram Language. 2007. "CancelButton." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CancelButton.html.
APA
Wolfram Language. (2007). CancelButton. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CancelButton.html