ui.Window methods are used to manipulate ui.Window objects.
To manipulate ui.Window objects, you have to:
declare the object with a DEFINE statement:
DEFINE window_object ui.Window
open a window with an OPEN WINDOW statement and give it a static name:
OPEN WINDOW my_window WITH FORM "my form" ATTRIBUTE(BORDER)
bind the opened window with the necessary ui.Window object:
LET window_object =ui.Window.ForName("my_window")
or
CURRENT WINDOW IS my_window
LET window_object =ui.Window.GetCurrent()
binds the window opened with an OPEN WINDOW statement with a ui.Window object |
|
binds the current window with a ui.Window object |
|
initializes a ui.Window object and opens a window |
|
create an empty form and displays it to the associated window |
|
initializes a ui.Window object and opens a window with a form in it |
|
specifies the title of the window |
|
retrieves the title of the window |
|
specifies the icon for the window title bar |
|
retrieves the icon for the window title bar |
|
allows the user to manipulate the form objects by getting a ui.Form instance that belongs to the current window |
|
clears a window opened by ui.Window.Open() or by ui.Window.OpenWithForm() methods |
|
moves the window associated with the variable to a new position |
|
brings the specified window to the top of the window stack, i.e. makes it the current window |
|
closes a window opened by ui.Window.Open() or by ui.Window.OpenWithForm() methods or initialized with a DEFINE statement |
|
displays a text to a specified window location |
|
displays a text to the reserved message line of the specified window |
|
displays a text to the reserved error line of the specified window |
Example code
MAIN
DEFINE wo ui.Window
OPEN WINDOW orders_w WITH 20 ROWS, 40 COLUMNS ATTRIBUTE(BORDER)
LET wo = ui.Window.forName("orders_w")
MENU "menu"
COMMAND "Change title"
CALL wo.setText("New window title")
COMMAND "Exit"
EXIT MENU
END MENU
CALL wo.Close()
END MAIN