DISPLAY FORM

DISPLAY FORM statement is used to display previously compiled and opened form.

Form name

The name of the form used previously in the OPEN FORM statement

ATTRIBUTE clause

The optional ATTRIBUTE clause where the display attributes can be specified

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

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

 

To be able to display a form with the DISPLAY FORM statement, you must first open it with the help of the OPEN FORM statement, where you declare the name of the form. Use this name of the form in the DISPLAY FORM statement. If you open a form with the help of the OPEN FORM with the WITH FORM clause, you need neither OPEN FORM nor DISPLAY FORM statement.

 

A form displayed by means of the DISPLAY FORM statement will be displayed in the current 4GL window. If no 4GL window is open, it will be displayed in the 4GL screen.

If the size of the form displayed by the DISPLAY FORM statement is larger than the window in which it is displayed, a runtime error will occur, informing you that the window is too small to display the form.

Form name

A form identifier previously declared in an OPEN FORM statement can be used after the DISPLAY FORM keywords to specify the form to display.

ATTRIBUTE clause

ATTRIBUTE clause of the DISPLAY FORM statement has the structure of the common ATTRIBUTE clause. If the ATTRIBUTE clause of the DISPLAY FORM statement contains the INVISIBLE attribute, this attribute is ignored. The attributes specified in the ATTRIBUTE clause of the DISPLAY FORM statement are applied to any fields that do not have attributes specified in the ATTRIBUTES section of a form specification file, or in the subsequent OPTIONS statement. If a form is displayed in a 4GL window, the attributes of the DISPLAY FORM statement override the colour attributes of the window. In their turn the attributes of the DISPLAY FORM statement can be overridden by the attributes of a CONSTRUCT, DISPLAY or DISPLAY ARRAY statement applied to this form.

Reserved lines

Forms are displayed at the line that has been specified as the FORM LINE within the most resent OPTIONS statement or in the corresponding OPEN WINDOW statement. The default FORM LINE is 3.

 

There are several lines in each 4GL window and in the 4GL screen which are reserved for specific 4GL actions. By default, they are:

First line

is reserved to display:

  • the PROMPT statement output
  • the first menu line containing the menu option names

Second line

is reserved to display:

  • the MESSAGE statement output
  • the second menu line containing the descriptions of the menu option names

Third line

is reserved to display the FORM LINE – the position of the first line of a form

Last but one line

is reserved to display the COMMENT line

Last line

is reserved to display the ERROR statement output

 

This example displays form with the name orders declared previously by the OPEN FORM statement:

OPEN FORM orders FROM "ord_info"

DISPLAY FORM orders

 

The default location of the reserved lines can be changed by means of the OPTIONS statement. You can also change the position of the form line in the ATTRIBUTE clause of the OPEN WINDOW statement that opens a window where the form is to be displayed.

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.