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

QuestionDlg

Show a question to the user and get a response

Declaration

Source position: line 0

function QuestionDlg(

  const aCaption: String;

  const aMsg: String;

  DlgType: TMsgDlgType;

  Buttons: array of Const;

  HelpCtx: LongInt

):TModalResult;

function QuestionDlg(

  const aCaption: String;

  const aMsg: String;

  DlgType: TMsgDlgType;

  Buttons: array of Const;

  const HelpKeyword: String

):TModalResult;

Arguments

aCaption

  

Used to set the caption of the question dialog.

aMsg

  

The question to be shown.

DlgType

  

The type of dialog to be shown in fact which icon will be shown.

Buttons

  

An array of return values and caption for the buttons on the question dialog.

HelpCtx

  

HelpCtx is used to specify which topic from the help should be shown.

Function result

The result of this function is the button the user pressed to close the dialog.

Arguments

aCaption

  

Used to set the caption of the question dialog.

aMsg

  

The question to be shown.

DlgType

  

The type of dialog to be shown in fact which icon will be shown.

Buttons

  

An array of return values and caption for the buttons on the question dialog.

Function result

The result of this function is the button the user pressed to close the dialog.

Description

QuestionDlg has the same functionality as MessageDlg
except for the parameter Buttons which is of a different type.
You can define your own captions and return values of this function.

Buttons is a list of TModalResult (defined as constants [mrNone..MrYesToAll] in Controls ) and strings.
For each TModalResult a button is created.
To set a custom caption, add a string after a button.

The default TModalResults defined in controls.pp (mrNone..mrLast)
doesn't need a caption. The default captions will be used.

See also

MessageDlg

  

Message Dialog

InputQuery

  

Use InputQuery to show a dialog box to get some input from the user

The latest version of this document can be found at lazarus-ccr.sourceforge.net.