Menus for in-place activation

When an object is activated in place, menus for its server application are merged with the menus in your PowerBuilder application. The Menu Merge Option settings in the Menu painter let you control how the menus of the two applications are merged. The values are standard menu names, as well as the choices Merge and Exclude.

StepsTo control what happens to a menu in your application when an OLE object is activated:

  1. Open the menu in the Menu painter.

  2. Select a menu item that appears on the menu bar. Menu Merge Option settings apply only to items on the menu bar, not items on drop-down menus.

  3. On the Style property page, choose the appropriate Menu Merge Option setting. Table 19-1 lists these settings.

    Table 19-1: Menu Merge Option settings

    You can choose

    Meaning

    Source of menu in resulting menu bar

    File

    The menu from the container application (your PowerBuilder application) that will be leftmost on the menu bar. The server’s File menu never displays.

    Container

    Edit

    The menu identified as Edit never displays. The server’s Edit menu displays.

    Server

    Window

    The menu from the container application that has the list of open sheets. The server’s Window menu never displays.

    Container

    Help

    The menu identified as Help never displays. The server’s Help menu displays.

    Server

    Merge

    The menu will be displayed after the first menu of the server application.

    Container

    Exclude

    The menu will be removed while the object is active.

  4. Repeat steps 2 and 3 for each item on the menu bar.

Standard assignments for standard menus

In general, you should assign the File, Edit, Window, and Help Menu Merge options to the File, Edit, Window, and Help menus. Because the actual menu names might be different in an international application, you use the Menu Merge Option settings to make the correct associations.

Resulting menu bar for activated object

The effect of the Menu Merge Option settings is that the menu bar displays the container’s File and Window menus and the server’s Edit and Help menus. Any menus that you label as Merge are included in the menu bar at the appropriate place. The menu bar also includes other menus that the server has decided are appropriate.