Generic function
Cancels the specified dialog.
cancel-dialog dialog #key destroy? => ()
<dialog-frame>.
<boolean>. Default value: #t.
None
duim-frames
duim-frames
Cancels dialog and removes it from the screen. Any changes that the user has made to information displayed in the dialog is discarded.
If destroy? is #t then the dialog is unmapped from the screen.
This is the default callback used for the cancel button in a dialog.
The following example defines a button, *no-button*, that calls cancel-dialog as its activate-callback. This button is then used in a dialog that simply replaces the standard cancel button for the newly defined dialog. Note that the example assumes the existence of a similar *yes-button* to replace the exit button.
define variable *no-button*
= make(<push-button>, label: "No",
activate-callback: cancel-dialog,
max-width: $fill);make(<dialog-frame>,
exit-button?: #f,
cancel-button?: #f,
layout: vertically ()
make(<label>,
label: "Simple dialog");
horizontally ()
*yes-button*;
*no-button*;
end
end);start-frame(*dialog*);