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";
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
GROUP
form item can be defined in different ways: - As a
GROUP
container in aLAYOUT
tree. - As a
<GROUP >
layout tag with aGROUP
item definition in theATTRIBUTES
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.
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.
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"
.
<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.