GUI.MessageDlg

Top  Previous  Next

Shows a customizable message dialog.

 

Syntax

function GUI.MessageDlg(Msg: string; DlgType: integer; Buttons: integer): integer

 

Alternative Names

ibec_MessageDlg

 

Description

Shows a message dialog with a graphical icon, depending on the dialog type, and one or more buttons.

 

Msg holds a message to be shown to the user.

 

DlgType is one of the predefined dialog types:

__mtWarning
__mtError
__mtInformation
__mtConfirmation
__mtCustom

shows a yellow triangle with black ! symbol

shows a red circle with white X mark

show a blue circle with white ! symbol

show a blue circle with white ? symbol

no image

 

A combination of predefined constants can be used for Button to show one or more buttons:

__mbYes
__mbNo
__mbYesNo
__mbOK
__mbCancel
__mbOKCancel
__mbYesNoCancel

 

 

combination of __mbYes and __mbNo

 

 

combination of __mbOK and __mbCancel

combination of __mbYes, __mbNo and __mbCancel

 

The Return Value is one of the predefined constants, depending on the button clicked:

__mrOK
__mrCancel
__mrYes
__mrNo
__mrNone

 

also returned by using keyboard ESC and the window close button

 

 

not returned by any dialog button

 

See also

GUI.ShowMessage

 

Example

execute UDSBlock returns (str_value varchar(100))

as

begin

  /* show a dialog and wait for OK click */

  GUI.ShowMessage('click this to continue');

  

  dlg_value = GUI.MessageDlg('Warning message! Still want to continue?', __mtWarning, __mbYes + __mbNo);

  if (dlg_value = __mrYes)

  then str_value = 'yes';

  else str_value = 'no';

  suspend;

  

  str_value = 'end of routine';

  suspend;

end