This method is used with a variable of the WINDOW data type to initialize it and to open a window:
variable.Open("window name", y, x, rows, columns [, attributes[, into]])
where
window_ name |
a quoted string or a variable of a character data type standing for a window name |
x, y |
a row and a column at which the upper-left corner of the window will appear (literal integers or INTEGER variables) |
rows, columns |
a number of rows and columns the opened window will have |
attributes |
(optional) a quoted string containing standard display attributes |
into |
(optional) a name of the placeholder to which the window will open (STRING) |
The window opened in such a way can be referenced by other methods used for windows, if they are used with the same WINDOW variable:
DEFINE wo ui.Window
CALL wo.Open("Window Name", 1, 1, 13, 35, "border")
There may be more than one attribute in the character string, and they should be separated by commas. Here are the attributes you can use:
Form-line:<integer>, error-line:<integer>, message-line:<integer>, menu-line:<integer>, prompt-line:<integer>:
CALL wo.Open("Window Name", 1, 1, 13, 35,"green, border, message-line:12, prompt-line:10")
The integer here stands for the number of the row where you want to position the reserved line. If the position for the reserved line is greater than the window height, the prompt will appear at the last line of the window.
x+ y and into must be set together:
CALL var.Open("My window", 1, 1, 50, 50, "border", ph2)
If you do not need to set optional parameters, you simply omit them:
CALL var.Open("My window", 1, 1, 50, 50)
If you want to open a window to a placeholder without attributes, you must set attributes as null:
CALL var.Open("My window", 1, 1, 50, 50, "", ph2)
or
CALL var.Open("My window", 1, 1, 50, 50, null, ph2)
Every 4gl program must include some user interactions.
If your 4gl program doesn't have any user interactions, it will be performed at runtime and close immediately - without visible actions (like opening windows or forms, etc.) except for console displays.