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
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";
GROUP
container may get a border,
and a title. The border may also be rendered with a shadow effect.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 Common style attributes and
Group style attributes.
Groups in grid-based layout
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.
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.GRID
container, this
layout specification technique is often more appropriate to define
forms:GRID
{
<G g1 ><G g2 >
[l1 :f1 ][f4 ]
...
<G g3 >
...
Groups in stack-based layout
In a STACK
container, GROUP
form items are
one of the base concepts used to put stack items together. For more details see Stacked group rendering.
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.
initiallyCollapsed
style attribute can be used to force the
initial state of a GROUP
, when displayed for the first time.<Style name="Group.mystyle">
<StyleAttribute name="collapsible" value="yes" />
<StyleAttribute name="collapserPosition" value="right" />
<StyleAttribute name="initiallyCollapsed" value="yes" />
</Style>
For more details, see Group style attributes.
Groups on mobile devices
- With GMA/Androidâ„¢, groups are visualized by a simple separator under the group title. Complex layout construction is supported: groups in groups, groups in a grid, and so on.
- With GMI/iOS, the layout is limited by the platform GUI standards. The only visible grouping container element is a group. Groups within groups are not allowed. GMI enforces each form item as a member in a group. There can be group headers and footers, but no elements in between groups.
Where to use a GROUP
GROUP
form item can be defined in different ways: - As a
GROUP
container in aLAYOUT
tree, within a grid-based layout. - As a
<GROUP >
layout tag with aGROUP
item definition in theATTRIBUTES
section, within a grid-based layout. - As a
GROUP
stack item, inside aSTACK
container, within a stack-based layout.