VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering

You are here: Visual Basic > Advanced VB6 tutorial > Chapter 14

Negotiating With the Container's Menus

When you begin to program with Active Documents, you are concerned with two applications that must share menu space on the same Window.

The solution to this issue is the NegotiatePosition property of the menu items. NegotiatePosition indicates the relative placement (left, middle, center, or none) of a menu item inside another application's menu system.

As illustrated in Figure 14.3, you will choose a NegotiatePosition property from the drop-down list in the Menu Editor for each toplevel menu item.

Here are the special considerations for each of the choices for NegotiatePosition:

  • None. The item won't show up with the container's menu.

  • Left. The container will typically never place your menu item on the extreme left side of the menu bar. This is because the left-most item is typically reserved for the container's File menu, which by convention always goes on the left. Instead the container will usually attempt to situate your menu item as close to the left as possible.

  • Middle. If you have a number of top-level menu items, all but two of them should have their NegotiatePosition property set to Middle (that is you can have at most one Left item and one Right item). The container will then use its own logic to determine where to place all the items you've designated with a Middle NegotiatePosition.

  • Right. If the container has a Help menu, the menu you specify with a NegotiatePosition of Right will show up under the container's Help menu (see the following section for more details). Otherwise, this menu will usually show up on the right of the container's menus.

The NegotiatePosition property in the Menu Editor.
FIGURE 14.3 The NegotiatePosition property in the Menu Editor.

You should note that the container application will make its own decision about how to interpret your NegotiatePosition property. You should think of this setting as a preference you are indicating to the container rather than an order that the container will definitely carry out.


<< Previous | Contents | Next >>

Home | About Us | Privacy Policy | Contact Us

Copyright © | All Rights Reserved