The “msgbox” and “inputbox” features and their parameters.
Product line
Standard
|Expert
Operating mode
CLOUD ABO
|ON-PREMISES
Modules
Services & CRM
Budget & Phases
Purchases
Resource Planning
Business Intelligence
vtcapp.msgbox(text[, buttons][, title])
The text to be shown.
If only the text is specified, the message box contains the title “Information” and an OK button:
vtcapp.msgbox("Dies ist mein Text")
Long texts can be \n
broken:
vtcapp.msgbox("Hier kommt \nder Zeilenumbruch")
Here the combination of buttons (OK, Cancel, etc.) and symbols (red X, yellow exclamation mark, etc.) that should be shown is defined. The indication is given by a number. If nothing is specified, the message box contains an OK button.
vtcapp.msgbox("Dies ist mein Text", 1)
The most commonly used buttons / icons are:
Value | description |
---|---|
0 | OK button. |
1 | OK and Cancel buttons. |
3 | Yes, No, and Cancel Buttons. |
4 | Yes and No Buttons. |
16 | Critical message: red X and an OK button. |
48 | Warning: yellow exclamation mark and an OK button. |
64 | Information: Blue i and an OK button |
The title of the message box.
vtcapp.msgbox("Dies ist mein Text", 1, "Vertec")
If a title is specified, a button must also be specified.
If nothing is specified, the message box has the title “Information”.
The message box returns the following values:
Value | Clicked button |
---|---|
1 | OK |
2 | Cancel |
6 | Yes |
7 | No. |
vtcapp.inputbox(title, text[, default])
The title of the input box. If you do not want the input box to have a title, specify an empty string.
The text to be shown.
vtcapp.inputbox("Vertec", "Wie lautet Ihr Name?")
If the text is multi-line, the individual rows can be \n
be separated.
If you want to show text as the default response in the field, you can specify the value as the third parameter.
vtcapp.inputbox("Vertec", "Wie lautet Ihr Name?", "Hier Ihren Namen eingeben")
When the user clicks OK (or presses Enter), the contents of the text box are returned.
When the user clicks Cancel, an empty string is returned.