TCustomForm.OnCloseQuery property
Event handler signalled when trying to close a form.
Declaration
property OnCloseQuery: TCloseQueryEvent read FOnCloseQuery write FOnCloseQuery;Description
OnCloseQuery is a
TCloseQueryEvent property which
contains the event handler signalled to determine whether the form can be
closed. Set the value in the
CanClose argument to
True to
allow the form instance to be closed. The default value for CanClose is
True.
Use OnCloseQuery to perform any actions or dialogs needed to confirm that the form can in fact be closed.
An application must implement and assign an object procedure using the signature in TCloseQueryEvent to respond to the event notification.
OnCloseQuery is signalled from the CloseQuery method, and occurs
immediately after MDI child forms have called their CloseQuery methods.
See also
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
