CancelButton
✖
CancelButton
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.
List of all options

Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Create dialog input and use CancelButton to cancel the action:
In[1]:=1

✖
https://wolfram.com/xid/0put0xs8q6-kdv5
Out[1]=1

Applications (2)Sample problems that can be solved with this function
Properties & Relations (3)Properties of the function, and connections to other functions
CancelButton is a special case of Button:
In[1]:=1

✖
https://wolfram.com/xid/0put0xs8q6-pdug3j
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0put0xs8q6-lqtgdr
Out[2]=2

Create a dialog with a cancel button; the dialog is dismissed by clicking the button or pressing :
In[1]:=1

✖
https://wolfram.com/xid/0put0xs8q6-uzazfj
Out[1]=1

Create a dialog that holds evaluations until the dialog is dismissed:
In[1]:=1

✖
https://wolfram.com/xid/0put0xs8q6-obg4am
Out[1]=1

Wolfram Research (2007), CancelButton, Wolfram Language function, https://reference.wolfram.com/language/ref/CancelButton.html.
✖
Wolfram Research (2007), CancelButton, Wolfram Language function, https://reference.wolfram.com/language/ref/CancelButton.html.
Text
Wolfram Research (2007), CancelButton, Wolfram Language function, https://reference.wolfram.com/language/ref/CancelButton.html.
✖
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.
✖
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
✖
Wolfram Language. (2007). CancelButton. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CancelButton.html
BibTeX
✖
@misc{reference.wolfram_2025_cancelbutton, author="Wolfram Research", title="{CancelButton}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/CancelButton.html}", note=[Accessed: 12-May-2025
]}
BibLaTeX
✖
@online{reference.wolfram_2025_cancelbutton, organization={Wolfram Research}, title={CancelButton}, year={2007}, url={https://reference.wolfram.com/language/ref/CancelButton.html}, note=[Accessed: 12-May-2025
]}