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

# TCustomForm.CancelControl

The control associated with the Cancel action.

## Declaration

Source position: forms.pp line 774

`public property TCustomForm.CancelControl : TControl read FCancelControl write SetCancelControl;`

## Description

Determines the control associated with the Cancel action (which exits from the modal form without changing anything). This is usually a button with the caption 'Cancel', but might be an 'Exit' button or anything else the application programmer decides. This control is selected either by explicitly clicking with the mouse, or by hitting the 'Esc' key.

## See also

TCustomForm.DefaultControl |  | The control associated with the default action for this form.