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

# TFindDialog.CloseDialog

Closes the dialog form when its Cancel button is clicked.

## Declaration

Source position: dialogs.pp line 515

`public procedure TFindDialog.CloseDialog;`

## Description

CloseDialog is called from the CancelClick method (the OnClick handler for the Cancel button on the dialog form). CloseDialog ensures that the internal TForm instance for the dialog class has been assigned, and calls its Close method. This initiates a series of method calls and event handler notifications needed to close the form.

    TCustomForm.Close ->
      TCustomForm.OnClose ->
        TFindDialog.DoCloseForm ->
          TCommonDialog.OnClose

## See also

TFindDialog.CancelClick |  | Implements the OnClick event handler for the Cancel button on the dialog.
TFindDialog.DoCloseForm |  | Implements the OnClose event handler on the internal form displayed for the dialog.
TFindDialog.CreateForm |  | Creates and configures the internal form displayed for the dialog.
TFindDialog.Execute |  | Displays the dialog form and responds to button clicks.
TCommonDialog.OnClose |  | Event handler signalled when the dialog is closed.
TCommonDialog.OnCanClose |  | Event handler signalled to determine if the dialog can be closed.
TCustomForm.Close |  | Closes the form.
TCustomForm.OnClose |  | Handler called when the form is closed. It determines what happens to the form (destroy, hide, etc.).