Displays a modal window with an error message, with waiting for the user to select from up to three possible choices.
Syntax |
errorBox(string title, string text, string b0, string b1="", string b2="", int def=0, int esc=-1): int |
---|---|
title |
Title of window |
text |
Message to be displayed |
b0 |
Button text 0 |
b1 |
Text of button 1 (optional, default "") |
b2 |
Text of button 2 (optional, default "") |
def |
Default button number (optional, default 0) |
esc |
Number of the button when closing (optional, default -1) |
Result |
Returns selected button number (0, 1 or 2) or -1 for none |
Annotation:
•The message window is modal, i.e., the window must be closed before work can continue.
•Buttons 1 and 2 are optional: if omitted, i.e. text "", they are not displayed and therefore cannot be selected.
•The button in case of window closure is the one that is automatically selected when you close the window (without selecting any of the three buttons) or when you press the Esc quick key.