IWebMessageBox.Show

Syntax

Show(Text: String; Caption: String; Buttons: WebMessageBoxButtons; Icon: WebMessageBoxIcon): WebDialogResult;

Parameters

Text. The text displayed in the dialog box.

Caption. Dialog box caption.

Buttons. Button set that will be available for the user.

Icon. Icon type displayed in the dialog box.

Description

The Show method opens the dialog box according to the specified parameters and returns the user action result.

Comments

The method opens dialog boxes with various purpose and contents according to the specified parameters.

Example

The specified function illustrates opening of various dialog boxes depending on he value sent in the input parameter. The function results in closing the dialog box.

Function CheckValue(Value: Integer): WebDialogResult;
Var
    Result: WebDialogResult;
Begin
    If Value <= 20 Then
        Result := WebMessageBox.Show("Value within the normal range""Information", WebMessageBoxButtons.Ok, WebMessageBoxIcon.Information);
    Elseif (Value > 20and (Value <= 60Then
        Result := WebMessageBox.Show("Value slightly exceeds the norm. Continue?""Notification",
            WebMessageBoxButtons.YesNo, WebMessageBoxIcon.Question);
    Elseif (Value > 60and (Value <= 100Then
        Result := WebMessageBox.Show("Value significantly exceeds the norm. Continuing the operation may result in system work failure!""Warning",
            WebMessageBoxButtons.YesNoCancel, WebMessageBoxIcon.Warning);
    Else
        Result := WebMessageBox.Show("Critical value. The process will be stopped""Error", WebMessageBoxButtons.Ok, WebMessageBoxIcon.Error);
    End If;
    Return Result;
End function CheckValue;

See also:

IWebMessageBox