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.
WITH FORM clause is an alternative to the Window Size clause which specifies the size of a window explicitly. The WITH FORM clause implicitly defines the number of rows and columns of the window depending on the dimensions of the form specified in the in this clause.
Element |
Description |
Form File |
A 4GL expression that returns the name of the form file and its relative path, if required |
The form file which follows the WITH FORM keywords can be:
A quoted character string containing the of the form file without extension and with path, if it is required.
A variable, a record member or an array element of character data type that contains the quoted name of the form file without the extension and with optional relative path.
Any 4GL expression that returns the quoted name of the form file without the extension and with optional relative path.
The height of the window opened with the WITH FORM clause is calculated according to these formulas:
In the graphical display mode: (form-line) + (form-length)+1 line. The line added at the end is the comment line. If you do not include one line into the window for the comments, they will be hidden behind the last line of the form. The error line is added automatically, it is not included into the declared window size.
In the character display mode (form-line) + (form-length). The error line is added automatically, it is not included into the declared window size. The comment line coincides with it.
The form line is the line where the first line of the form is displayed; it is the third line of a window. The form length is the number of lines in the SCREEN section of the form specification file.
Unless other line is specified as the form line in the OPTIONS statement or in the ATTRIBUTE clause of the corresponding window, the default value of this sum in the character display mode is 3+(form-length).
The example below opens a window my_window at the third line and sixth column of the 4GL screen with form my_form. The height of the my_form is 15 lines, thus the total height of the window with the default FORM LINE position will be 3+15=18 lines:
OPEN WINDOW my_window AT 3,6 WITH FORM "my_form"
Opening a window with a form is convenient, if a window should display only one form throughout the program. You do not need the OPEN FORM, DISPLAY FORM, or CLOSE FORM statements to operate the form, if you open it by means of the OPEN WINDOW statement. The OPEN WINDOW statement opens and displays a form at the same time. The CLOSE WINDOW statement closes the form together with the window.
OPEN WINDOW … WITH FORM statement cannot be used for:
Displaying more than one form in one 4GL window
Displaying a 4GL window with larger dimensions than the dimensions of the form specified in the statement
To perform the actions listed above use the OPEN WINDOW … WITH ROWS, COLUMNS statement and use the OPEN FORM, DISPLAY FORM, or CLOSE FORM statements to operate a form or forms.