XFA Specification
Chapter 2, Template Features for Designing Static Forms
Basic Layout
56
Natural size of widgets
Widget
button
Natural width
Natural height
Has no natural size (or a natural size of zero) because it does not display any
content. A field containing a button displays only the field caption and field
borders, but with their appearance changed to indicate clickability.
The size property plus left and right
margins. Defaults to 10 points and no
margins.
Same as a text edit.
The size property plus top and bottom
margins. Defaults to 10 points and no
margins.
Same as text edit.
check box or radio
button
choice list
date, time, or
date-time picker
image
numeric edit
password edit
signature
text edit
May be displayed temporarily by the application during data entry while the
field has focus. When the field loses focus it reverts to the same display rules as a
text edit.
Same as text edit.
Same as a text edit.
Same as text edit.
Same as text edit.
Same as a text edit, except each character of content is replaced with an asterisk
(“*”) character.
Implementation-defined.
The width of the text block plus the
left and right margins. Defaults to no
margins.
The height of the text block plus the
top and bottom margins. Defaults to no
margins.
Margins and Borders
A widget, other than a button, may have its own margins and borders in addition to any margins and
borders asserted by its container. When a text widget declaration has a margin element but the element
asserts no attributes the margin default varies depending upon the presence of a border. Text widgets
include date, time, and date-time widgets, choice lists, numeric edit, password edit and text edit widgets,
and signature widgets. For these widgets when there is no border the default margin is zero on all sides.
When there is a border the default margin is twice the border thickness on all sides, plus an additional
amount on the top margin equal to the descent of the font (for a rich-text field, the default font.) By
contrast, for all other widgets the margin default is always zero on all sides whether there is a border or
not.
Size Requirement for Containers
For images, draws containing geometric figures, and contentAreas, the
w
and
h
attributes are mandatory. If
either of these is not supplied the layout processor should either infer a size from context (for example
from a
minH
attribute) or default the value to 0. Whichever strategy is taken the goal is to continue
processing even if the result is unattractive.
Layout Strategies
There are two layout strategies, positioned layout and flowing layout. In
positioned layout,
each layout
object is placed at a fixed position relative to its container. In
flowing layout,
objects are placed one after
the other in sequence, and the position of each object is determined by all the previous objects to be
Home Index Bookmark Pages
Pages: Home Index All Pages