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

# TCustomTaskDialog.OnButtonClicked

Event handler signalled for the button clicked when the Task dialog was executed.

## Declaration

Source position: dialogs.pp line 831

`public property TCustomTaskDialog.OnButtonClicked : TTaskDlgClickEvent read FOnButtonClicked write FOnButtonClicked;`

## Description

OnButtonClicked is a TTaskDlgClickEvent property with the event handler signalled (when assigned) after a button is clicked on the task dialog during execution. It is signalled from the DoOnButtonClicked method.

Arguments passed to the TTaskDlgClickEvent event handler include the TTaskDialog instance, the modal result value, and a Boolean flag which indicates if the dialog can be closed. Setting the CanClose argument to False in the handler routine causes the dialog to continue its Execute processing loop.