Getting Started


Arranging visual parts

To arrange visual parts you can use the tool bar buttons or selections from the Tools menu. Each tool bar button has a corresponding menu choice with the same name that performs the same function. The menu choices or buttons you use to arrange visual parts are as follows:

Align Left
Figure alinleft not displayed.

Align Center
Figure alincntr not displayed.

Align Right
Figure alinrit not displayed.

Align Top
Figure alintop not displayed.

Align Middle
Figure alinmidl not displayed.

Align Bottom
Figure alinbttm not displayed.

Distribute Horizontally
Figure dstrhorz not displayed.

Distribute Vertically
Figure dstrvert not displayed.

Match Width
Figure machwide not displayed.

Match Height
Figure machhite not displayed.

In this tutorial, you'll be directed to the menu choices, but feel free to use the tool bar buttons instead.

Note:Like the choices on the Tools menu, many of the buttons on the tool bar are unavailable unless you have more than one visual part selected. To select two or more parts at the same time,
  1. Place your mouse pointer over the part you want to select, press and hold Ctrl and click and release mouse button 1.
  2. While holding down the Ctrl key, move the mouse pointer to another part and click and release mouse button 1.

Repeat these steps as many times as necessary, until you have selected all the parts you need to size or align in relation to each other.

Notice that the part you select last has solid handles, while the other selected parts have hollow handles. The part with solid handles is used as a reference point. So, when you want to align several parts, select the parts you want to move first. Those parts will be aligned with the part you select last.

In "Defining a reusable visual part", you will add an Address group box to the Customer Information window. So arrange the Label and Text parts at the top of the Window and the push buttons at the bottom, leaving enough room for the Address Group Box between them.

For a complete description of the tool bar and the tools available, refer to Composition Editor in the VisualAge help facility or the VisualAge for Smalltalk User's Guide.

To arrange the visual parts on the Customer Information window, perform the following steps:

  1. Select both the Find Push Button and Cancel Push Button

    Both buttons are selected. The Find Push Button has hollow handles and the Cancel Push Button has solid handles.

  2. From the Tools menu, select Match Width.

    The Find Push Button is resized to match the Cancel Push Button in width.

  3. From the Tools menu, select Match Height.

    The Find Push Button is resized to match the Cancel Push Button in height.

  4. From the Tools menu, select Align Middle.

    The Find Push Button's vertical center is aligned to the center of the Cancel Push Button.

  5. From the Tools menu, select Distribute Horizontally.

    The two Push Buttons are placed at regular intervals across the Window.

Using the bounding box

Next, align the Label and Text parts in the top portion of the Window, leaving space in the middle for the Address Group Box.

The bounding box enables you to align selected parts within a portion of your Window, rather than the entire Window. The selected portion is defined by the topmost and bottommost, or leftmost and rightmost sides of the parts selected.

  1. Select the Phone Text part and the associated Label.

    Both parts display selection handles.

  2. Move these parts to where you want them in the Window using mouse button 1.

    The Phone Text part and the associated Label define the bottom of the bounding box, while Customer Number defines the top of the bounding box.

  3. Select all the Text parts (not the Label parts), making sure the Customer Number Text part is the last one selected.

    All the Text parts are selected. The Customer Number Text part should have primary selection handles (solid).

  4. Click mouse button 2 on one of the selected parts. Select Layout>Distribute>Vertically In Bounding Box.

    Now the Text parts are all evenly distributed in the top portion of Window.

  5. From the Tools menu, select Align Left Figure alinleft not displayed.to align the parts on the left.

    All Text parts are aligned on the left.

  6. Select all the Label parts, making sure that the Customer Number Label part is the last one selected.

    All the Label parts are selected.

  7. Click mouse button 2 on one of the selected parts. Select Layout>Distribute>Vertically In Bounding Box.

    Now the Label parts are all evenly distributed in the top portion of Window. If you are not satisfied with your results, from the Edit menu, select Undo and try again.

  8. From the Tools menu, select Align Left.

    All Label parts are aligned on the left.

In the next chapter, you will add the Address part to this Window.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]