Aligning and Distributing Objects


When you align a set of selected objects, you line up one edge or the center of the selected objects with that of some reference object. For example, to make a horizontal left alignment is to line up the left edges of all selected objects with the left edge of the object located farthest to the left on the interface. The selected objects are moved so that the left edge of every object lines up with that of the left-most object.


When you distribute a set of objects, you space them evenly without moving the outermost objects. For example, to distribute horizontal centers is to space the horizontal centers of all selected objects equally between the center of the left-most object and the center of the right-most object.

When you choose Java as your code generation language, you can only directly move or align objects (with the mouse, the Alignment Editor, etc.) if you have selected No Layout (in source code terms, foo.setLayout(null); ) for the parent. In all other cases, the layout policies of the parent object dictate the size and placement of the object.

Note: Frequently, geometry management policies of an object's parent dictate the size of the object. In these cases, the mouse, the placement grid, and the alignment menus and editors are all ignored.

Aligning Existing Objects

You can rapidly align any set of existing objects with Builder Xcessory using the Align item from the Browser Edit menu (and also the MB3 Quick Access menu).

1. Select the objects you want to align with one of the following methods:

· Search/Select Area in the Browser
· Shift-MB1 Drag to circle the objects in the Browser, or your interface
· Ctrl-MB1 to select or deselect individual objects

2. Select Align from the Browser Edit menu or MB3.

3. Select the desired alignment from the resulting menu.

· Left, Right, Top, Bottom, Horizontal Center, Vertical Center
· Alignment Editor

Using the Alignment Editor

The Alignment Editor provides extensive control over the positions of your objects. You can both align and distribute your objects. The Alignment Editor also displays an example of your alignment and distribution options, allowing you to view the effects of your changes before you commit them.

Alignment Editor describes the elements of the Alignment Editor window:


Alignment Editor