Form Constraint Editor

The Form Editor provides a graphical method of accessing the constraint resources of any child of a form widget. The editor is created with the form and exists as a transparent interface to the widget. When you place widgets as children of a form, the child widget's topAttachment, rightAttachment, bottomAttachment, and leftAttachment resources are represented by attachment icons on the widget's top, right, bottom, and left edges, respectively. For example, in the following figure, the right push button has the following attachments:

· topAttachment = XmATTACH_FORM

· rightAttachment = XmATTACH_NONE

· bottomAttachment = XmATTACH_NONE

· leftAttachment = XmATTACH_WIDGET

Form Editor

Editing attachment resources

Use the Form Editor to edit the child widget's attachment resources according to the following methods:

· Press MB3 on an attachment icon. A list of the possible values for that resource (for example, the values XmATTACH_POSITION and XmATTACH_OPPOSITE_FORM) is displayed. The toggle button for the current value is set, those for the other values are unset. Move the cursor over the desired value and release the mouse button. The attachment changes accordingly.

· Hold down Ctrl and press MB3 on an attachment icon. The current settings are displayed. Moving the cursor while holding Ctrl down allows you to change the offset or attach position.


Note: You can cancel the change by releasing the Ctrl key before the mouse button.

· Press the MB1 on an attachment and drag the cursor to the desired attachment. To attach to a widget, drag to the desired edge of the widget; to attach to the form, drag towards the edge of the form. Release the mouse button. The attachment changes accordingly.

· To set an attachment to XmATTACH_POSITION, drag MB1 from the attachment icon onto the widget itself.

· To modify an attachment's offset/position information, press Ctrl+MB3 on the attachment icon, drag to the desired location, and release Ctrl and MB3.

Attachment Symbols

In the Form Editor, the Builder Xcessory uses the following symbols to represent the various form attachment types:

Form Editor Symbols

The symbols are rotated to indicate the side to which they apply:

Rotated Symbols

Setting attachments

For many operations on the form and its children, you do not have to use the keyboard. Mouse buttons one and three are used for many operations on the form child constraints.

Setting Form Editor Attachments

All actions relating to the form attachments must be initiated on the attachment icons. When the cursor moves into the attachment icon, the cursor will change to indicate that you may perform attachment actions.

 

Documentation: