Constructing the OAMain Part


OAMain composition illustration

Before you can finish contruction of this part, you must have already constructed the query window parts.

  1. Create a visual part as follows:

    The part opens in the Composition Editor.

  2. For this part, the client area requires 9 rows and 7 columns. Make the following expandable:

  3. Delete the ButtonBar and ClientArea parts, exposing the MultiCellCanvas1 part underneath. From this point on in this procedure, the term client area refers to MultiCellCanvas1.

  4. Set the background color for the client area as follows:

  5. Add text parts to the client area as follows. Shorthand used in these tables corresponds to (rowNumber, columnNumber).

    Table 27. Text Parts for OAMain
    Add... To... Change it to read...
    IStaticText* (6,2) Skill
    IStaticText* (6,4) Contract
    IStaticText* (6,6) Contractor

  6. Add an ICanvas* part to cell (2,2). Span it to cell (2,6).

  7. Drop an IBitmapControl* part on the ICanvas* part. In the bitmap control's property sheet, adjust the position of the control on the canvas. Set the bitmap control's resource number to 800.

  8. Add an IGraphicPushButton* part to cell (4,2). Set properties as follows:

  9. Add an IGraphicPushButton* part to cell (4,4). Set properties as follows:

  10. Add an IGraphicPushButton* part to cell (4,6). Set properties as follows:

  11. Drop an IPushButton* part in cell (8,4). Name it ExitPB and change its label to read Exit.

  12. Drop an IVBFlyText* part on the free-form surface. Name it HoverHelp.

  13. Because you specified menu support when you created the OAMain part, VisualAge placed menu parts on the free-form surface. Edit them as follows:

  14. Add an OASkill* part to the free-form surface; name it Skill.

  15. Add an OAContract* part to the free-form surface; name it Contract.

  16. Add an OAContractor* part to the free-form surface; name it Contractor.

  17. Add five each of Factory and Variable parts. Set them as follows:

  18. Connect parts as follows:

    Table 28. Connections for OAMain
    Connection number From Part, feature... To Part, feature...
    0 ExitPB, buttonClickEvent FrameWindow, close
    1 Skill, this OAQuerySkillFac, skill
    2 FrameWindow, this OAQuerySkillFac, owner (need to explicitly set this for modal display)
    3 SkillGPB, buttonClickEvent OAQuerySkillFac, new
    4 SkillMI, commandEvent OAQuerySkillFac, new
    5 OAQuerySkillFac, newEvent OAQuerySkillVar, this
    6 OAQuerySkillFac, newEvent OAQuerySkillVar, setFocus
    7 OAQuerySkillFac, newEvent OAQuerySkillVar, showModally
    8 Contract, this OAQueryContractFac, contract
    9 FrameWindow, this OAQueryContractFac, owner
    10 ContractGPB, buttonClickEvent OAQueryContractFac, new
    11 ContractMI, commandEvent OAContractViewFac, new
    12 OAContractViewFac, newEvent OAContractViewVar, this
    13 OAContractViewFac, newEvent OAContractViewVar, setFocus
    14 OAContractViewFac, newEvent OAContractViewVar, show
    15 Contractor, this OAQueryContractorFac, contractor
    16 FrameWindow, this OAQueryContractorFac, owner
    17 ContractorGPB, buttonClickEvent OAQueryContractorFac, new
    18 ContractorMI, commandEvent OAContractorViewFac, new
    19 OAContractorViewFac, newEvent OAContractorViewVar, this
    20 OAContractorViewFac, newEvent OAContractorViewVar, setFocus
    21 OAContractorViewFac, newEvent OAContractorViewVar, show
    22 ExitMI, commandEvent FrameWindow, close


Related procedures
Constructing the OASearch Part
Working with Parts in the Composition Editor
Editing Part Properties
Dropping Parts in the Composition Editor
About Promoting Part Features
Making Connections in the Composition Editor

Related references
IBitmapControl
Factory
IVBFlyText
IGraphicPushButton
IMenuItem
IMultiCellCanvas
Variable

Constructing the OASearch Part


OASearch composition illustration

Before you can construct this part, you must have constructed the OAMain part.

  1. Create a nonvisual part as follows:

    The part opens in the Composition Editor.

  2. Add an OAMain* part to the free-form surface. Call it MyMain.

  3. Connect the ready feature of the composite to the show action of MyMain.


Related concepts
Generated Application Code

Related procedures
Constructing the OAMain Part
Working with Parts in the Composition Editor
Dropping Parts in the Composition Editor
Making Connections in the Composition Editor

Related references
IVBMain