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

DefaultQuestionDialog

Implements a widgetset-independent dialog.

Declaration

Source position: dialogs.pp line 722

function DefaultQuestionDialog(

  const aCaption: string;

  const aMsg: string;

  DlgType: LongInt;

  Buttons: TDialogButtons;

  HelpCtx: LongInt

):LongInt;

Description

Shows a dialog with aCaption as Title, aMsg as Text, DlgType as Icon, HelpCtx as Help context and Buttons to define the shown buttons and their TModalResult.

Buttons is a list of TModalResult and strings. For each number a button is created. To set a custom caption, add a string after a button.

The default TModalResults defined in controls.pp (mrNone..mrLast) does not need a caption. The default captions will be used.

Examples for Buttons:

[mrOk,mrCancel,'Cancel now',mrIgnore,300,'Do it','IsDefault']

This will result in 4 buttons: