Shows a
dialog window asking for user's decision
Returns a
String representing the pushed button: ButtonOK, ButtonCancel or
ButtonAlternative.
Parameters:
Name |
Type |
Description |
msg |
String |
Question
to be asked to the user |
title |
String |
Window
title of the dialog |
btnDefault |
String |
Caption
of the default button (Create New) |
btnAlternative |
String |
Caption
of the alternative action button (Use existing) |
btnCancel |
String |
Caption
of the Cancel button (Abort) |
Returns:
Type |
Value |
Description |
String |
name of
button pushed |
The
following names can be returned by the function: buttonOK
(btnDefault was pushed) buttonAlternative
(btnAlternative was pushed) buttonCancel
(btnCancel was pushed) |
Available
in:
WindowMain |
WindowLink |
YES |
YES |
Used in:
XojoScript
Name |
GUID |
Create
Seminar Invoice with Word |
31EB5A79-78E5-4A8C-9101-5B118F113AB4 |
Create
Seminar Reminder Invoice |
A3DD8BD9-6141-44A1-AA82-5A2C78042209 |
Hint: You can
find references to XojoScripts which make use of this function by sending the
following SQL statement to the database:
Select id,GUID, ScriptName,ScriptCode from
im_scripts where ScriptCode Like '%GetDecision%'
Example
XojoScript:
Dim
title As String
= "Invoice already existing"
Dim
msg As String = "Do
you wish to create a new invoice?"
Dim
btn1 As String = "Use
Existing" // buttonOK
Dim
btn2 As String = "Create
New" // buttonAlternative
Dim
btn3 As String = "Abort" // buttonCancel
Dim
decision As String
= GetDecision(msg,title,btn1,btn2,btn3)
Select
Case decision
Case
"buttonOK"
MsgBox("Use Existing")
Case
"buttonAlternative"
MsgBox("Create New")
Else
MsgBox("Abort")
End