WITH FORM clause

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.

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:

When you specify a file name, be careful with its case.

UNIX is case-sensitive, so it will treat files which names come in different cases as separate files.

The height of the window opened with the WITH FORM clause is calculated according to these formulas:

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:

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.

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.