To meet your needs, we constantly work to improve Querix products.
This means that Lycia documentation is developing as well.
In case you have found a certain dissonance between the provided information and the actual behavior of Lycia 3 and/or your applications, please, let us know about this via documentation@querix.com so that we can introduce the necessary changes to our documentation.
Thank you for your attention and cooperation.
If the names of the variables and the names of the fields differ, you should use TO clause instead of BY NAME clause. The DISPLAY statement with the TO clause has the following structure:
Element |
Description |
Display Value |
An actual value enclosed in the double quotation marks, a variable which value is to be displayed or their combination separated by comas. |
Field List |
A list of individual form fields, screen records and their members or screen arrays and their elements |
ATTRIBUTE Clause |
An optional ATTRIBUTE clause which affects the display attributes applied to the Display Value |
You can list the fields individually or you can use screen records or screen arrays, either way they should be separated by commas. You can use the screen_record.* notation to specify all the fields of a screen record, or you can use the screen_array[i].* notation to specify all the fields within the i line of a screen array. However, the DISPLAY ARRAY statement is more convenient for displaying information to screen arrays.
If an ATTRIBUTE clause is present within the DISPLAY statement, the attributes will be applied to all the fields specified in the TO clause, or implied by the BY NAME clause.
In the example below, all the variables that belong to a program record are displayed to a screen record. The order of the fields in the screen record must be the same as the order of the variables within the program record. They also should correspond to each other in number and their data types should be the same or compatible, but they need not have the same names as in the case with the BY NAME clause.
DISPLAY pr_rec.* TO scr_rec.*
Besides, the DISPLAY statement with the TO clause can also be used to change the appearance and behavior of a button and a label form objects.
To update the appearance of these widgets, that is image and text label properties setting, or replacing or removing of the already existing ones, you should pass an Uri as an image property value, or a text to be displayed as a widget`s text label. The execution algorithm of such a statements is as follows.
Updating the already existing settings:
If a widget possesses only one of the two properties (image or text), a display value passed to the statement replaces the one, that is set.
If both properties are already applied to a widget, the image is replaced in the case the display value stands for an Uri. Otherwise, the text label is changed.
If neither image nor text is set, an image is updated in the case the display value stands for an Uri. Otherwise, the text label is applied.
Removing an image or a text label from a widget:
Passing the NULL string (a zero length value) as a display value
DISPLAY "" TO button_name
# removes an already existing property settings, if a widget possesses at least one of them;
# removes a text label if a widget has both an image and text label set (as the string passed as a display value does not stand for an Uri).
Passing the qx:empty string as a display value
DISPLAY "qx:empty" to button_name
# always removes only an image property settings
As concerns a widget behavior, it can be modified by passing one of the following symbols '!', '*' or '?' as a display value to the DISPLAY ... TO widget statement.
By default, on a form loading, the dynamic context event state of a widget is activated. For such a behavior the '?' symbol stands:
DISPLAY "?" TO widget_name
Symbols '*' and '!', irrespective of the presence of any active events at any moment of a program workflow, stand for a widget enabling and disabling correspondingly. The same result can be obtained using the SetEnable() method: if its value is TRUE (the default behavior), a widget is active, that means it can be interacted with; otherwise, it becomes disabled (grayed and inaccessible for the user).