XFA Specification
Chapter 7, Layout for Growable Objects
218
Growable Containers
An XFA template may contain growable container elements, which means the container’s size may
change. Growable objects are very useful in form processing environments. Growth may occur along
either the X and Y axes as follows:
●
Growable along both X- and Y-axes. An application of this feature is a region of freeform text on a form
with no imposed width to force word-wrapping, and no limit on height.
Growable along the Y-axis only. An application of this feature is the body text field of a memorandum
form where many lines of input causes the field to grow vertically.
Growable along the X-axis only. An application of this feature is a field that accommodates a product
part number of indeterminate length.
●
●
The dimensions of non-growable container objects are determined from the outside-in. In contrast, the
dimensions of a growable container are determined from the inside-out.
●
Non-growable container dimensions. When a form-designer uses a GUI-based template design
application to place an container object on the template, the software application typically works form
the outside-in. That is, it starts with the rectangle drawn by the designer and applies the margins to
determine the available nominal content region.
Growable container dimensions. The growability of a container object becomes apparent during form
fill-in. When a container object is growable, the XFA processing application typically works from the
inside-out. It computes a content region from the container's contents and then applies the margins to
determine a dynamic
nominal extent.
●
A container object is growable if the following conditions are met:
●
Container supports growth.
The container’s content type or ui supports growth. Most container
elements with widget properties are growable, but container elements with arcs, lines, or rectangles
properties are not. The Appendix
“Layout Objects” on page 955
specifies the content types and ui’s
that support growth.
Container omits one or both fixed size attributes.
The container omits a fixed dimension (
h
or
w
) along
one or both axes. The presence of the
h
or
w
attributes with non-empty values fixes the height or width
of a container. The absence of those attributes in a growable container indicates the axis/axes along
which the container may grown, as described in the following table.
Axis along
which
container
grows
None
●
Non-null
attribute
h
✔
w
✔
Explanation
If both h and w are non-null, the container is not growable on either axis.
Any
minW
/
minH
/
maxW
/
MaxH
values are ignored.
An example of a fixed-size container follows:
<field name="text_field" h="1in" w=".5in"/>
Note:
The default value for
w
and
h
are null, the default value for
minH
and
minW
is 0, and the default value for
maxH
and
maxW
is infinity.
✔
X
If
h
is specified (non-null) and
w
is null, the container is horizontally
growable and vertically fixed. Any
minH
/
maxH
values are ignored.