Form specification files / Form file structure |
The LAYOUT section defines the graphical alignment of the form by using a tree of layout containers.
LAYOUT [ ( layout-attribute [,...] ) ] root-container child-container [...] END [END]
The LAYOUT section must appear in the sequence described in form file structure.
This section is mandatory, unless you use a SCREEN section.
Indentation is supported in the LAYOUT section.
The END keyword is optional.
The layout tree of the form is defined by associating layout containers. Different kinds of layout containers are provided, each of them having a specific role. Some containers such as VBOX, HBOX and FOLDER can hold children containers, while others such as GRID and TABLE m` define a screen area. Containers using a screen area define a formatted region containing static text labels, item tags and layout tags. External form files can be included in the current layout with the FORM clause.
LAYOUT VBOX GRID grid1 grid-area END GROUP group1 HBOX GRID grid2 grid-area END TABLE table1 table-area END END END END END
-- VBOX | +-- GRID grid1 | +-- GROUP group1 | +-- HBOX | +-- GRID grid2 | +-- TABLE table1
LAYOUT GRID grid-area END END
The VERSION attribute can be used to specify a version for the form. This allows you to indicate that the form content has changed. Typically used to avoid having the front-end reload the saved window settings.
The MINHEIGHT, MINWIDTH attributes can be used to specify a minimum width and height for the form. You typically use these attributes to force the form to get a bigger size as the default when it is first rendered. If the front-end stores window sizes, these attributes will only be significant the first time the form is opened, or each time the VERSION attribute is changed.
The IMAGE attribute can be used to define the icon of the window that will display the form. This attribute will automatically be applied to the parent window node when a form is loaded.
The TEXT attribute can be used to define the title of the window that will display the form. This attribute will automatically be applied to the parent window node when a form is loaded.
The SPACING attribute can be used to give a hint to the front-end to define the gad between form elements.
The STYLE attribute defines the presentation style for form elements, you can for example define a font property for all form elements.
With the WINDOWSTYLE attribute, you can define the window type and decoration. This attribute will automatically be applied to the parent window when a form is loaded. For backward compatibility, the STYLE attribute is used as the default WINDOWSTYLE if this attribute is not used.
GROUP group1 (TEXT="Customer")
DEFINE w ui.Window DEFINE g om.DomNode LET w = ui.Window.getCurrent() LET g = w.findNode("Group","group1") CALL g.setAttribute("text","This is the first group")