# SWT FormLayout

FormLayout class that implements an constraint-based layout manager. With constraint-based layout, you have independent control over the sizing behavior of each of the four sides of a widget. The top, bottom, left, and right sides can be independently attached to the sides of the parent container or the sides of any sibling widget within the same container using either fixed or relative offsets. This proves to be surprisingly powerful and can be used to emulate almost any of the other layout managers. The FormLayout class is very simple and only specifies the margins of the container. The real power is in the FormData object, which holds up to four different FormConstraint objects.

In Automatic Mode, attachments are determined automatically based on the position of the widgets themselves. In Classic mode, full control over the attachments on each widget side is available.

- Main Features

- Graphical Feedback

- Preferences

## Main Features

- Select FormLayout from the Layouts palette and drop it on a Window or Composite

- Graphical feedback is provided for all widget size and position operations

- Support for Automatic Placement mode and Classic mode.

## Graphical Feedback

- Position and size widgets using FormLayout constraints

- Align widgets horizontally and vertically

- Indent widgets intelligently

- Align widgets to margins

- Anchor widgets to the left, right or both sides

- Anchor widgets to the top, bottom or both sides

- Align widgets to percentage offsets

- Set anchors via popup context menus

- Set anchors and offsets via the Property Pane

- Align and center widgets using toolbar

- Set anchors and alignment using floating layout assistant mage:images/assistant.gif[image]