Getting Started
The reusable part you created is much like any of the parts on the parts
palette. As a matter of fact, you can add your part to the parts
palette if you think it will be used often in your development efforts.
You can also use the Add Part window to add the part without having
it appear on the parts palette.
To add the SecurityFormView part to the BuySecurityView and
SellSecurityView parts, ensure that a Composition Editor is open for each
visual part and follow these steps for each part:
- Select add part

from the tool bar in the Composition Editor.
The Add part window opens:

- On the Add Part window, in the Class name field, type
SecurityFormView.
- Note:
- If you do not remember the class name of the part you want to add, select the
Browse button. This opens a list of all available
classes.
- Note:
- You do not have to specify a name in the Part name field.
If you do not specify a name, one is provided for you just as when you add a
part from the parts palette.
- Because you will be using this visual part like any other part, make sure
Part is selected in the Part type field.
- Select OK.
The mouse pointer is now loaded with your SecurityFormView part.
- Click mouse button 1 on the Window part to add the part as a child of the
window part.
- Move the reusable part to the appropriate place within the window.
Notice that your reusable composite visual part is manipulated as a single
part now.
To set the input focus to the appropriate Text part when the window is
opened, you need to connect the openedWidget event of the Window
part to the setFocus action of the Text part.
- Within the Composition Editor for the BuySecurityView do the
following:
- Connect the openedWidget event of the VisualAge Buy
Security Window part to the setFocus action of the
Shares to buy Text part.
- Save the part and close the Composition Editor for this visual
part.
- Repeat the previous two steps for the SellSecurityView visual
part, giving the initial input focus to the Shares to sell Text
part.
Make sure you save each of the parts and close both of the Composition
Editor windows.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]