GROUP item type

Defines a layout area to group other layout elements together.

GROUP item basics

A GROUP form item type groups other form items together, typically in a groupbox widget.

Defining an GROUP

The GROUP form item typically gets a TEXT attribute, to define the title of the group. Consider using localized strings for this attribute:
GROUP ...
  TEXT=%"customer.info";
Consider identifying group elements with a name, in order to manipulate the group during program execution. For example use the ui.Form.setElementHidden() method to hide or show groups in a form:
GROUP g1: g_cust_info, ... ;   -- grid-based layout
GROUP g_cust_info, ... ;       -- stack-based layout

Front-ends support different presentation and behavior options, which can be controlled by a STYLE attribute. For more details, see Style attributes common to all elements and Group style attributes.

Where to use a GROUP

A GROUP form item can be defined in different ways:
  1. As a GROUP container in a LAYOUT tree.
  2. As a <GROUP > layout tag with a GROUP item definition in the ATTRIBUTES section.

Group containers

In a LAYOUT tree with GROUP containers, if you want to include several children in a GROUP, you can add a VBOX or HBOX into the GROUP, to define how these form items are aligned.

Note:

When defining a GROUP container, you cannot set the GRIDCHILDRENINPARENT attribute. This attribute makes sense only for a group item defined with a layout tag contained in a GRID area.

Consider using a group layout tag inside a GRID container, this layout specification technique is often more appropriate to define forms:
GRID
{
<G g1             ><G g2        >
[l1  :f1          ][f4          ]
 ...
<G g3                            >
 ...

Collapsible groups

By default, groups are not collapsible.

Some front-ends (see Group presentation style attributes reference) support the collapsible presentation style attribute, to let end users expand/collapse GROUP elements in your forms.

When a group is defined as collapsible, the collapserPosition style attribute can be used to define the position of the collapser icon.

The initiallyCollapsed style attribute defines if the collapsible group is collapsed or expanded when the form is displayed. Values can be "yes", "no", "never" and "always".

For example:
<Style name="Group.mystyle">
   <StyleAttribute name="collapsible" value="yes" />
   <StyleAttribute name="collapserPosition" value="right" />
   <StyleAttribute name="initiallyCollapsed" value="yes" />
</Style>
Note:

These style attributes are supported in both stack and grid layout.

For more details, see Group style attributes.