Common Desktop Environment: Application Builder User's Guide

Aligning and Distributing Objects in an Interface

This section describes "static" alignment and distribution of objects: the objects are aligned or distributed one time only. See Chapter 7, Grouping and Attaching Objects, for instructions to find out how to group and attach objects for "dynamic" alignment.

To Align Control Objects in an Interface

  1. Select two or more objects.

    See "To Select Control Objects in the Interface or the Browser" for instructions.

  2. Choose Align from the Layout menu of the primary window or the interface pop-up menu (displayed by pressing mouse button 3) and select one of the alignment icons from the submenu.

    The selected objects will be aligned according to the alignment choice. Choices are described below. Vertical alignment icons are on the left and are described first.

    • Left-edge: Aligns selected objects vertically along their left edges.

    • Vertical-center: Aligns selected objects vertically on their horizontal centers.

    • Right-edge: Aligns selected objects vertically along their right edges.

    • Colon: Aligns selected objects vertically along their colons or labels.

    • Top-edge: Aligns selected objects horizontally along their top edges.

    • Horizontal-center: Aligns selected objects horizontally on their vertical centers.

    • Bottom-edge: Aligns selected objects horizontally along their bottom edges.

    • Grid: Does no alignment at this time.


    Note -

    If you select objects that are arranged horizontally and choose a vertical alignment (or vice versa), the objects will end up on top of one another. You can unstack the objects by choosing Distribute from the pop-up menu immediately after the align function (the objects will still be selected). See "To Distribute Control Objects Evenly" for instructions.


To Distribute Control Objects Evenly

  1. Select one or more objects.

    See "To Select Control Objects in the Interface or the Browser" for instructions. Select one object to center it between the edges of its parent.

  2. Choose Distribute from the Layout menu of the primary window or the interface pop-up menu (displayed by pressing mouse button 3) and select one of the distribute icons from the submenu.

    The selected objects will be distributed or centered according to your choice.

    Objects will be spaced 10 pixels apart horizontally or vertically if you choose one of the distribute choices. If you choose one of the centering choices, the object or objects will be centered within the boundaries of the parent control pane.

    • Horizontal-space: Distributes selected objects horizontally 10 pixels apart. The left-most object is the anchored object, which does not move.

    • Vertical-space: Distributes selected objects vertically 10 pixels apart. The top-most object is the anchored object, which does not move.

    • Horizontal-center: Centers selected objects horizontally between the left and right edges of the parent object, maintaining the distance between selected objects.

    • Vertical-center: Centers selected objects vertically between the top and bottom edges of the parent object, maintaining the distance between selected objects.