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:
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,
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:
Both buttons are selected. The Find Push Button has hollow handles and the Cancel Push Button has solid handles.
The Find Push Button is resized to match the Cancel Push Button in width.
The Find Push Button is resized to match the Cancel Push Button in height.
The Find Push Button's vertical center is aligned to the center of the Cancel Push Button.
The two Push Buttons are placed at regular intervals across the Window.
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.
Both parts display selection handles.
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.
All the Text parts are selected. The Customer Number Text part should have primary selection handles (solid).
Now the Text parts are all evenly distributed in the top portion of Window.
All Text parts are aligned on the left.
All the Label parts are selected.
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.
All Label parts are aligned on the left.
In the next chapter, you will add the Address part to this Window.