User interface / Windows and forms in programs |
Creates and displays a new window.
OPEN WINDOW identifier [ AT line, column ] WITH [ FORM form-file | height ROWS, width COLUMNS] [ ATTRIBUTE ( window-attributes ) ]where display-attribute is:
{ BLACK | BLUE | CYAN | GREEN | MAGENTA | RED | WHITE | YELLOW | BOLD | DIM | INVISIBLE | NORMAL | REVERSE | BLINK | UNDERLINE | BORDER | TEXT = "string" | STYLE = "string" | PROMPT LINE = integer | MENU LINE = integer | MESSAGE LINE = integer | ERROR LINE = integer | COMMENT LINE = { OFF | integer } }
An OPEN WINDOW statement can have the following effects:
For graphical applications, use this instruction without the AT clause, and with the WITH FORMclause.
The window identifier must follow the rules for identifiers and be unique among all windows defined in the program. Its scope is the entire program. You can use this identifier to reference the same Window in other modules with other statements (for example, CURRENT WINDOW and CLOSE WINDOW).
The compiler converts the window identifier to lowercase for internal storage. When using functions or methods receiving the window identifier as a string parameter, the window name is case-sensitive. We recommend that you always specify the window identifier in lowercase letters.
The runtime system maintains a stack of all open windows. If you execute OPEN WINDOW to open a new window, it is added to the window stack and becomes the current window. Other statements that can modify the window stack are CURRENT WINDOW and CLOSE WINDOW.
MAIN OPEN WINDOW w1 WITH FORM "customer" MENU "Test" COMMAND KEY(INTERRUPT) "exit" EXIT MENU END MENU CLOSE WINDOW w1 END MAIN