OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Creating Menu Descriptors

The TMenuDescr class implements menu descriptor functionality.

Menu descriptors take a menu resource and place the separate pop-up menus in the resource into six functional groups. The naming of the groups is arbitrary; you are not restricted to putting only menus of a certain functional type into a particular group. However, the naming convention does reflect standard conventions of menu item placement. These names are contained in the TGroup enum:

  • FileGroup
  • EditGroup
  • ContainerGroup
  • ObjectGroup
  • WindowGroup
  • HelpGroup

These groups are arranged consecutively on the menu bar from left to right. When another menu descriptor is merged with the existing menu bar, the new pop-up menus are merged according to their groups. For example, consider the two figures from Using Menu Descriptors.

In the first figure, the original pop-up menus are placed in the following menu groups:

  • The File menu is placed in the FileGroup group.
  • The Edit menu is placed in the EditGroup group.
  • The Window menu is placed in the WindowGroup group.
  • The Help menu is placed in the HelpGroup group.

When the child window is created, its pop-up menu, called Tools, is placed in the ContainerGroup group. Then, when the menus are merged in the second figure, the child window's menu is automatically placed between the Edit menu and the Window menu.

See Also