XFA Specification
Chapter 2, Template Features for Designing Static Forms
Basic Layout
58
Assume that the data binding process resulted in the
text "
field B content
" being associated with field
B and "
field C content
" with field
C
. The resulting
layout is reproduced at right, with some coordinates
labelled. (0,0) is the origin of the
pageArea
. (2,2) is the
location of the top-left corner of the
contentArea
,
while (15,17) is its lower-right corner. Field
B
is placed
2cm down and 2 cm to the right of the top-left corner
of its container, the subform. Hence field
B
's top-left
corner is placed at (4,4). This form also includes
background text. Background objects are explained in
“Page Background” on page 60.
Here the important
things to observe are that positioned layout is used for
this block of background text and that it is positioned
relative to its own container, the
pageArea
itself.
A contained object may specify an anchor point which
is the reference point for its offset. The default is its
top-left corner. However the offset is always specified
with respect to the container's top-left corner
regardless of the container's own anchor point. The
anchor point is one of the following points within the
object's nominal extent:
(0,0)
(2,2)
(4,4)
field B content
subform A
(4,9)
field C content
(3,14)
boilerplate text
contentArea Y
(1,22)
background text
(15,20)
pageArea X
Simple layout example with coordinates
top left corner
middle of the top edge
top right corner
middle of the left edge
center
middle of the right edge
bottom left corner
middle of the bottom edge
bottom right corner
The anchor point affects the direction in which the contained object grows if its width and height are
increased. For example, if the template is modified to increase the height of field
C
, and the anchor point of
C is at the top-left, the field extends farther down the page but its top-left corner stays at (4,9). However if
its lower-right corner was the anchor point then increasing its height would cause its top-left corner to
move up the page while the lower-right corner stayed fixed.
Home Index Bookmark Pages
Pages: Home Index All Pages