Show(Text: String; Caption: String; Buttons: WebMessageBoxButtons; Icon: WebMessageBoxIcon): WebDialogResult;
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.
The Show method opens the dialog box according to the specified parameters and returns the user action result.
The method opens dialog boxes with various purpose and contents according to the specified parameters.
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 > 20) and (Value <= 60) Then
Result := WebMessageBox.Show("Value slightly exceeds the norm. Continue?", "Notification",
WebMessageBoxButtons.YesNo, WebMessageBoxIcon.Question);
Elseif (Value > 60) and (Value <= 100) Then
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: