Dialogs
Dialog boxes are used to provide information to the user, request user confirmation, or prompt the user to enter information.
User input is stored in variables that can then be used by the script.
Table of Contents
Input dialog
var1=inputDialog(text,
inputLabel,inputType,inputGeometry,valDef
[,dialogType[,dialogGeometry[,buttonSet[,dialogRef]]]]);
returned value : value of the input widget.
Inputs dialog
inputsDialog(text,
varName,inputLabel,inputType,inputGeometry,
valDef,constraint,constraintErrMess,toolTip
[,varName,inputLabel,inputType,inputGeometry,
valDef,constraint,constraintErrMess,toolTip]
...
[,dialogType[,dialogGeometry[,buttonSet[,dialogRef]]]]]);
varName : variable where to store the input.
toolTip : help text displayed on input widget mouse over.
Input parameters
inputLabel
At the left of the input widget. Unused for checkbox.
inputType
- it_Bool : CheckBox
- it_Date, it_Integer, it_Real : EditBox
- it_Text : EditBox or TextBox (height>0) or ComboBox (more than 1 possible values).
- it_Dir : selecting a directory.
- it_DirNew : Input of a non-existent directory.
- it_DirExists : selecting an existing directory.
- it_File : selecting a file.
- it_FileOpen : selecting an existing file.
- it_FileSave : selecting a file path with warning if file exists.
- it_Table : selecting a new value or value from a table.
- it_TableExists : selecting a value existing in a table.
- it_TableNew : selecting a value non-existent in a table.
- it_TableCombo : selecting a value via ComboBox from a table containing fewer than 20 records.
- it_Title : no input, simple bold title.
inputGeometry
label left, label width, input width, input height, '|' separed. Default values are :
- it_Bool : '0|0|350|-1'.
- it_Date : '0|250|120|-1'.
- it_Integer, it_Real : '0|250|80|-1'.
- it_FileXXX, it_DirXXX, : '0|250|300|-1'.
- it_TableXXX : '0|250|150|-1'.
- it_Title : '0|250|0|-1'.
- it_Text (EditBox) : '0|250|200|-1'.
- it_Text (ComboBox) : '0|250|150|-1'.
If it_Text and input height > 0, default width is 400.
valDef
- it_Bool : true or false.
- it_Date : default, min and max values, '|' separed. Ex :
'2026-01-01|2026-01-01|2026-12-31'
- it_Integer, it_Real : default, min and max values, '|' separed. Ex :
'1|0|100'
- it_Text : default and possibles values, '|' separed. Ex :
'Cat|Cat|Dog'
First parameter is default value.
If more than 2 parameters, input widget is ComboBox. If last parameter is "*", user can enter new value. Ex :
'Cat|Cat|Dog|*'
- it_FileXXX : default value, file filter, '|' separed. Ex :
'home/marc/myFile.pdf|*.pdf *.html'
- it_TableXXX : default value, table name, field name, where close, '|' separed. Ex :
'Marc|MyTable|First_name|First_name LIKE ''M%'''
With it_TableCombo, if 5th parameter is "*", user can enter new value. Ex :
'Marc|MyTable|First_name||*'
Message dialog
messageDialog(shortText[,longText[,dialogType[,dialogGeometry]]]);
Ok cancel dialog
var1=okCancelDialog(text[,dialogType[,dialogGeometry[,buttonSet]]]);
returned value : 1 if clicked button is Ok, Next or Finish. 0 otherwise.
Radio buttons dialog
var1=radioButtonDialog(text,options[,defOptionIndex[,disabledOptionIndexes,
[,dialogType[,dialogGeometry[,buttonSet]]]]]);
returned value : index of checked radio button if clicked button is Ok, Next or Finish. Null otherwise.
options : Labels for radio buttons, '|' separed. Ex: 'Option 1|Option 2'.
defOptionIndex : default radio button index, from 0.
disabledOptionIndexes : indexes of visible but disabled radio buttons, '|' separed. Ex: '0|2'.
Select dialog
selectDialog(text,varName,selectStatement[,toolTip[,dialogType[,buttonSet]]]);
varName : prefix for variable names where to store the selected row field values. Field1 value is stored in varName+'_Field1'. All field values of selected row are stored.
Selected column field name is stored in varName+'_selectedColName'.
Selected column field value is stored in varName+'_selectedColValue'.
selectStatement : SELECT SQL query.
Table dialog
tableDialog(text,varName,tableName[,whereClose[,toolTip[,dialogType[,buttonSet]]]]);
varName : prefix for variable names where to store the selected row field values. Field1 value is stored in varName+'_Field1'. All field values of selected row are stored.
Selected column field name is stored in varName+'_selectedColName'.
Selected column field value is stored in varName+'_selectedColValue'.
tableName : Table or view name.
whereClose : Without WHERE keyword. Ex: 'Field1 NOTNULL'
Yes no dialog
var1=yesNoDialog(text[,dialogType[,dialogGeometry]]);
returned value : 1 if clicked button is Yes. 0 otherwise.
Dialog parameters
dialogType
Standard pixmap : sp_Critical, sp_Information, sp_None, sp_Question, sp_Warning.
dialogGeometry
width, height, left and top, '|' separed (ex '400|200|100|100'). If left and top are missing, windows is centered.
buttonsSet
bs_OkCancel (default), bs_NextCancel, bs_PrevNextCancel, bs_PrevFinishCancel.
When exiting the dialogs, clicked button is stored in exitButtonDialog variable as eb_Previous, eb_Ok or eb_Cancel.
Ok, Next and Finish buttons give eb_Ok.
dialogRef
If not empty, user inputs are localy stored and next time used as default values.