[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'InterfaceBase' (#lcl)

# TDialogButton.Cancel

True if the button is the Cancel button.

## Declaration

Source position: interfacebase.pp line 94

`public property TDialogButton.Cancel : Boolean read GetCancel write SetCancel;`

## Description

Cancel is a Boolean property which indicates if the button is used as the Cancel button in the dialog.

Cancel is True when the button instance is the value assigned to the CancelButton property in TDialogButtons collection. Setting a new value in Cancel causes the CancelButton property in TDialogButtons to be updated accordingly.

Use Default to control whether the button is the default button for the dialog.

Use ModalResult to set the value returned when the button is clicked.

## See also

TDialogButton.Default |  | True if the button is the default button.
TDialogButton.ModalResult |  | The modal result value returned when the button is clicked.
TDialogButtons.CancelButton |  | The cancel button for the dialog.