Unit 'MUIClass.Dialog' Package
[Overview][Types][Classes][Procedures and functions][Index] [#MUIClass]

MessageBox

Open a MessageBox with Text and configurable Buttons

Declaration

Source position: MUIClass.Dialog.pas line 105

function MessageBox(

  HeadText: string;

  Text: string;

  Buttons: TStringArray

):Integer;

Arguments

HeadText

  

Text in the Window title of the MessageBox

Text

  

Text in the MessageBox

Buttons

  

Buttons as String Array

Function result

Index of the Button pressed, take care the last Button is 0, First Button is 1, Second is two (if not last) and so on

Description

Example:

Ret = MessageBox('Overwrite', 'File already exists, will be overwritten, ok?', ['Yes', 'Yes for all', 'No', 'No for all', 'Cancel']);
case Ret of
  1: DoYes;
  2: DoYesAll;
  3: DoNo;
  4: DoNoForAll;
  0: DoCancel;
end;

Documentation generated on: 2024-11-21