Windows and forms in programs / OPEN WINDOW |
By default, windows are displayed as normal application windows, but you can use the window style to show a window at the top of all other windows, as a "modal window".
The window style defines the type of the window (normal, modal) and its decoration, via a presentation style. The presentation style specifies a set of attributes in an external file (.4st).
There are different ways to define the style of a window: The STYLE attribute can be used in the OPEN WINDOW instruction to define the default style for a window, but it is better to specify the window style in the form file, with the WINDOWSTYLE attribute of the LAYOUT section. This avoids decoration-specific code in the programs.
Style name in 4st file | Description |
---|---|
Window | Defines presentation attributes for common application windows. When using MDI containers, normal windows are displayed as MDI children. |
Window.main, Window.main2 | Defines presentation attributes for starter applications, where the main window shows a startmenu if one is defined by the application. |
Window.dialog, Window.dialog2, Window.dialog3, Window.dialog4 | Defines presentation attributes for typical OK/Cancel modal windows. |
Window.naked | Defines presentation attributes for windows that should not show the default view for ring menus and action buttons (OK/Cancel). |
Window.viewer | Defines presentation attributes for viewers as the report pager (fglreport.per). |
It is recommended that you not change the default settings of windows styles in the FGLDIR/lib/default.4st file. If you create your own style file, copy the default styles into your own file in a different directory.
It is not possible to change the presentation style attributes of windows dynamically in the AUI tree. The style is applied when the window and form are loaded.
If you open and display a second form in an existing window, the window style of the second form is not applied.