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

# TCustomTaskDialog.DefaultButton

Index of the default button, from the set in the CommonButtons property.

## Declaration

Source position: dialogs.pp line 823

`public property TCustomTaskDialog.DefaultButton : TTaskDialogCommonButton read FDefaultButton write FDefaultButton default tcbOk;`

## Description

DefaultButton is TTaskDialogCommonButton property which indicates the default button for the Task dialog. It represents the button that is clicked if the user presses the Space or Enter key when the Task dialog is initially displayed.

The property contains one of the values from the CommonButtons property. The default value for the property is tcbOK, and represents the OK button.

It is used to set the default modal result value returned during execution when a DefaultButton has not been specified in the Buttons collection.

## See also

TCustomTaskDialog.CommonButtons |  | Set of common buttons displayed on the Task dialog.
TCustomTaskDialog.Buttons |  | Collection with the buttons for the Task dialog.
TTaskDialogButtons.DefaultButton |  | Contains the collection item that is the default button for a Task dialog.
TTaskDialogCommonButton |  | Identifier used for common buttons visible on a Task dialog.