Defining hbox tags in grids
An hbox tag is defined by using a
:
colon in an item tag delimited by square
brackets:[f1 ][f2 ] -- No hbox tag
[f1 |f2 ] -- No hbox tag
[f1 :f2 ] -- f1 and f2 in hbox tag
Next example creates an hbox containing the fields "
a
", "b
" and
"c
". In the grid, the widgets for these fields won't be aligned with the widgets
created for the "d
", "e
" and "f
" fields, because
it is the parent hbox that will align with the grid columns:LAYOUT
GRID
{
[a:b:c ]
[d|e|f ]
}
END
END
ATTRIBUTES
EDIT a = FORMONLY.a;
EDIT b = FORMONLY.b;
EDIT c = FORMONLY.c;
EDIT d = FORMONLY.d;
EDIT e = FORMONLY.e;
EDIT f = FORMONLY.f;
END
The three first widgets are then rendered independently, inside the hbox tag:
Hbox tags are useful when the form contains large widgets in a small number of cells, that must
not be dependent to other widgets regarding grid column alignment. For example, when using a
CHECKBOX
for field "d":LAYOUT
GRID
{
[a:b:c ]
[d|e|f ]
}
END
END
ATTRIBUTES
EDIT a = FORMONLY.a;
EDIT b = FORMONLY.b;
EDIT c = FORMONLY.c;
CHECKBOX d = FORMONLY.d, TEXT="Checkbox";
EDIT e = FORMONLY.e;
EDIT f = FORMONLY.f;
END
The alignment in the grid would result to:The next example is now using a
CHECKBOX
for field "d
", and
hbox tags to group fields "a" and "b" as well as "d" and "e", and uses regular item tags to align
the widgets of field "c" and "f" without an hbox tag:LAYOUT
GRID
{
[a:b ][c ]
[d:e ][f ]
}
END
END
ATTRIBUTES
EDIT a = FORMONLY.a;
EDIT b = FORMONLY.b;
EDIT c = FORMONLY.c;
CHECKBOX d = FORMONLY.d, TEXT="Checkbox";
EDIT e = FORMONLY.e;
EDIT f = FORMONLY.f;
END
Rendering result fields "c
" and "f
" are now aligned: