Create form widgets using the createForm:argBlock: convenience method. Position form widget children by attaching their sides to other objects. Specify attachments by setting each child's
leftAttachment,
rightAttachment,
topAttachment and
bottomAttachment resources. A side can be attached either to a given position, to another widget, or to the edge of the form. The attachment types are listed below. The first four types are the most commonly used. All are described in terms of the
leftAttachment, but the same attachment types apply to the other sides, with corresponding behavior.
Attach the left side of the child to a relative position in the form. This position is specified by the leftPosition resource, and is a fractional value of the width of the form, with the default range being from 0 to 100. The position is relative to the
left side of the form for left and right attachments, and to the
top of the form for top and bottom attachments. A position of 0 places the left side of the child at the left side of the form. A position of 100 places the left side of the child at the right side of the form.
If the attachment is XmATTACHFORM or
XmATTACHWIDGET, an offset can also be specified that adds space between the side of the widget and the object to which it is attached. Offsets are specified by the
leftOffset,
rightOffset,
topOffset, and
bottomOffset resources. Offsets are specified in units of pixels.