Table of Contents

TTMSFNCTaskDialog.OnBeforeCloseDialog Event

Occurs before the dialog closes, letting the handler cancel the close.

API unit family: TMSFNCTaskDialog Declaring type: TTMSFNCTaskDialog Inherited from: TTMSFNCCustomTaskDialog

Syntax

OnBeforeCloseDialog: TTMSFNCCustomTaskDialogBeforeCloseEvent;

Remarks

Fires for every close, including common buttons, custom buttons, and command links, so read ModalResult inside the handler to distinguish which button triggered it before deciding whether to cancel. Use this event to validate required input (for example InputText) before allowing an OK-style close.

Parameters

Name Description
Sender The dialog that raises the event.
AAllow True by default; set to False to keep the dialog open and cancel the close.