Submenu Control

This document covers the following topics:


Description

A submenu control is a part of a complex menu structure. When the end user chooses a menu item of type submenu, the submenu control is pulled down, containing a vertical list of menu items.

You create a submenu control in the dialog editor by creating a menu item with the MENU-ITEM-TYPE of MT-SUBMENU or MT-WINDOWMENU. In Natural code, a submenu control is embedded into a menu structure by assigning its HANDLE to the MENU-HANDLE attribute of a menu item.

An MT-WINDOWMENU submenu control is used for MDI frame and MDI child windows. The windowing system adds the currently existing MDI child windows dynamically to such a submenu control.

The PARENT of a submenu control may be a dialog or NULL-HANDLE. If a dialog is the PARENT, the submenu control is private to the dialog and is deleted when the dialog is closed. If a NULL-HANDLE is the PARENT, the submenu control is free and will be deleted when the application is closed. A free submenu control can be shared among several menu structures in several dialogs if the handles are defined in a global data area rather than in a local data area.

Attributes for Submenu Control

Attribute Name Query Set/Modify In Attr. Window
CLIENT-DATA X X/X  
CLIENT-HANDLE X X/X  
CLIENT-KEY X X/X  
CLIENT-VALUE X X/X  
FIRST-CHILD X -/-  
HELP-ID X X/X  
LAST-CHILD X -/-  
MENU-ITEM-OLE X X/X  
PARENT X X/-  
PREDECESSOR X -/-  
STYLE X X/-  
SUCCESSOR X -/-  
SUPPRESS-BEFORE-OPEN-EVENT X X/X  
TYPE X X/-  
VISIBLE X X/X  

Events

Before Open Event (may be suppressed).