LAYOUT section
The LAYOUT section defines the graphical alignment of
the form by using a tree of layout containers.
Syntax
LAYOUT [ ( layout-attribute [,...] ) ]
root-container
child-container
[...]
END
[END]
- layout-attribute is an attribute for the whole form.
- root-container is the first container that holds child-containers.
Form attributes
IMAGE, MINHEIGHT, MINWIDTH, SPACING, STYLE, TEXT, TAG, VERSION, WINDOWSTYLE.
Style attributes (form)
Common: backgroundColor, border, fontFamily, fontSize, fontStyle, fontWeight, localAccelerators, showAcceleratorInToolTip, textColor, textDecoration.
Class-specific: resetFormSize.
See also: Window style attributes, UserInterface style attributes.
Can hold
FORM, VBOX, HBOX, GROUP, FOLDER, GRID, SCROLLGRID, STACK, TABLE, TREE.
Usage
The LAYOUT section is used to define a tree of layout containers, it
can mix grid-based layout containers (GRID), with stack-based
layout containers (STACK).
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 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 (VERSION="12", STYLE="regular")
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 table1GRID container
(equivalent to a V3 SCREEN
definition):LAYOUT
GRID
grid-area
END
ENDDescription of LAYOUT attributes
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 have a bigger size than 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 is automatically 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 is automatically 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 gap 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 is automatically 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.