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

TCustomForm.OnCloseQuery

Handler called before the form is closed. It can reject an close request.

Declaration

Source position: forms.pp line 707

public property TCustomForm.OnCloseQuery : TCloseQueryEvent
  read FOnCloseQuery
  write FOnCloseQuery
  stored IsForm;

Description

An OnCloseQuery handler can check for unsaved information, ask the user whether it's okay to save or discard changes, or simply reject the close request.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.