fgl_window_open()

 

Querix4GL allows opening windows with a dynamic name by using the fgl_window_open() function. This opens the window in the specified position, makes it the required size and gives it the name as provided in the function call. Also in the function call is the optional parameter of a form to be opened in that window.

 

Usage

 

The function fgl_window_open() is synonymous with the OPEN WINDOW statement, and functions in the same manner. It takes as its arguments the window’s name, its position and size and defines whether the window has a border or not.

For example,

 

CALL fgl_window_open("w_test", 2, 2, 20, 60, TRUE)

 

is functionally identical to the statement:

 

OPEN WINDOW w_test AT 2, 2 WITH 20 ROWS, 60 COLUMNS ATTRIBUTE(BORDER)

 

This function also has the optional parameter of a form; including this parameter will open the window at the specified location with the dimensions as specified in the form definition. This means there is no need to include the ROWS or COLUMNS when opening a form.

For example,

 

CALL fgl_window_open("w_test", 2, 2, "form_name", TRUE)

 

is functionally equivalent to the statement:

 

OPEN WINDOW w_test AT 2, 2 WITH FORM "form_name" ATTRIBUTE(BORDER)

 

To open the window as a flat one and in full screen, change the last parameter to FALSE:

 

CALL fgl_window_open("w_test", 2, 2, "form_name", FALSE)

 

 

The traditional method of closing windows, using the 4GL code:

 

CLOSE WINDOW(window_name)

 

will not work when opening windows that were opened with fgl_window_open().