f$DialogOpen (f$DialogOeffnen)
f$DialogOpen (f$DialogOeffnen)
Open a dialog window. The window is displayed on the screen with current data, though unactivated (i.e. entries are not (yet) possible). The dialog name is entered and an identification number is returned, using which the window is addressed in later function calls.
Note: this is an expert function intended for demanding usage scenarios. In normal cases the f$Dialog function should be used.
Contrary to f$Dialog and f$DisplayDialog, dialogs are opened with f$DialogOpen:
·So that individual dialog field properties from out of the decision table can be edited dynamically, e.g. to make a dialog field visible or invisible.
·So that they can be specifically activated from the decision table. In this way it is possible to work in multiple windows which are displayed on the screen simultaneously.
It is possible to open up to 20 dialogs simultaneously. The positions of these dialogs on the screen are defined by the positions saved in the dialogs. For this reason they must be fine-tuned to each other. Windows can only be moved by the user, and only when the window is active i.e. when it is accepting entries. Windows can only be activated via the decision table (with f$DialogExecute).
In principle, multiple dialogs with the same dialog name can be opened simultaneously since the dialogs are always addressed through their identification numbers (return value of this function) afterward. However these dialogs then lie on top of each other.
Please note:
The data displayed in an inactive dialog is not automatically updated. It is only updated when the dialog is activated (with f$DialogExecute). Should the data in an inactive dialog be updated, then this dialog must have been opened with f$DisplayDialog instead of f$DialogOpen.
A dialog opened via f$DialogOpen is closed again via f$DialogClose (or automatically at the end of a logic).
·The f$DialogOpen function can be used directly from out of a watching logic (Watch-DT). However, during the following f$DialogExecute, the dialog which launched the watching logic is disabled until the now active dialog closes again.
Syntax: | WindowID = f$DialogOpen( DlgName[,Visible] [,Mode] ) | ||
| Argument | Type | Meaning |
| DlgName | String | Name of the dialog to be displayed |
| Visible | Integer | This parameter controls whether the dialog should be visible immediately or not. If 0 is entered, then the dialog is only visible with the command f$DialogExecute or f$ActionDialog. If 1 is entered or the parameter left out, then it is visible immediately. |
| Mode | Integer | Way of showing dialog: 0 – normal, 1- with inactive Close button |
Result: | Integer | ID number for the opened window | |
Example: | ID = f$DialogOpen( 'Order data',1) | ||
Please note:
If an error message referring to an undefined parameter appears on the screen while calling a function, then this is probably a parameter within the dialog window. If the verification of the DT similarly finds an error, the cause is either an incorrect function argument (DlgName) or the return value for the f$DialogOpen function.
Functions that can be used instead of f$DialogOpen:
f$Dialog | Editing "simple" f$Dialog dialogs |
f$DisplayDialog | Open a window for showing data |
Functions that can be used after performing f$DialogOpen:
f$DialogExecute | Activate a dialog via ID |
f$ActionDialog | Activate an opened dialog (via ID) without return |
f$DialogClose | Close a dialog via ID |
f$SetBoolProp | Make dialog field visible/invisible or activate it |
f$SetTextProp | Set dialog field caption |
f$SetNumProp | Set further dialog field properties |
f$GetTextProp | Read text property from dialog object |
f$GetNumProp | Read numeric property from dialog object |