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

# TPromptDialogFunction

Specifies a function called to display and execute a widgetset-independent dialog using the specified settings.

## Declaration

Source position: interfacebase.pp line 213

`type TPromptDialogFunction = function(`
`const DialogCaption: string;`
`const DialogMessage: string;`
`DialogType: LongInt;`
`Buttons: PLongint;`
`ButtonCount: LongInt;`
`DefaultIndex: LongInt;`
`EscapeResult: LongInt;`
`UseDefaultPos: Boolean;`
`X: LongInt;`
`Y: LongInt`
`):LongInt;`

## Arguments

`DialogCaption` |  | Caption for the dialog. An empty string causes the default description for the dialog type to be used.
`DialogMessage` |  | Text displayed as the main content on the dialog. Allows embedded end-of-line sequences in the text.
`DialogType` |  | Integer constant which indicates the dialog type like idDialogWarning, idDialogError, idDialogInfo, idDialogConfirm, or idDialogShield.
`Buttons` |  | Pointer to the address where the button identifiers for the dialog are specified.
`ButtonCount` |  | Number of buttons located at the specified address.
`DefaultIndex` |  | Ordinal position for the default button on the dialog. 0 is used if the value is not valid for the number of buttons.
`EscapeResult` |  | Modal result value returned when the Esc or Alt+F4 is used to cancel the dialog.
`UseDefaultPos` |  | True causes the dialog to be centered on the screen using the screen size and the dimensions for the dialog. False causes the values in X and Y to be used to set the left and top coordinates for the dialog.
`X` |  | Horizontal coordinate for the left edge of the dialog. Used when UseDefaultPos is False.
`Y` |  | Vertical coordinate for the top edge of the dialog. Used when UseDefaultPos is False.

## Function result

Modal result value returned when the dialog is executed.

## Description

TPromptDialogFunction is the type used for the PromptDialogFunction variable in the interfacebase.pp unit. DefaultPromptDialog in dialogs.pp is an implementation of the type.

## See also

PromptDialogFunction |  | Procedure variable with the routine called to execute a platform-independent prompt dialog.
DefaultPromptDialog |  | Widgetset-independent implementation of a prompt dialog.