Configuring windows with styles

Use the STYLE attribute to set a style for a window.

The window style defines the type of the window (normal, modal) and its decoration, via the presentation style attribute. The presentation style specifies a set of attributes in an external file (.4st).

By default, windows are displayed as regular (normal) application windows. The type of window is defined by the windowType style attribute.

There are different ways to define the style of a window: The STYLE can be used in the OPEN WINDOW instruction to define the default style for a window, or it can be specified in the form file, with the WINDOWSTYLE attribute of the LAYOUT section.


In GUI mode, form elements can also be decorated with presentation styles. Pay attention to the specific rules that apply when combining TTY attributes and presentation styles.

Table 1. Standard window styles defined in the default presentation style file
Style name in 4st file Description
Window Defines presentation attributes for regular application windows.
Window.main, Window.main2 Defines presentation attributes for starter applications, where the main window shows a start menu if one is defined by the application.
Window.dialog, Window.dialog2, Window.dialog3, Window.dialog4

Defines presentation attributes for modal windows.

Window.naked Defines presentation attributes for windows that do 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.