Working with IMenuCascade Parts

The following tasks are associated with using an IMenuCascade* part in visual composition. Tasks that are common to many parts are described in related topics.

Defining text for a cascade menu item
To define text for the cascade menu item, do either of the following:

Defining a mnemonic
If you want to establish a mnemonic for the cascade menu item, type a tilde (~) before the mnemonic character in the menu item text. For Windows, VisualAge maps the tilde to an ampersand (&). If you type an ampersand, the mnemonic is not portable.

Assigning a bitmap
To assign a bitmap to the cascade menu item, set the bitmap property in the IMenuCascade* property sheet. In the Resource Id prompter property window, specify a bitmap resource by setting the following fields:

Associating a cascade menu item with a submenu
To associate the cascade menu item with a submenu, connect the submenu's this attribute to the IMenuCascade* menu attribute. The submenu opens when the user selects the cascade menu item.

Defining menu help information
You can define help information about the menu item. This text appears in the frame window information area when the user selects the menu choice. To define help information for the cascade menu item, set the Info area text property in the IMenuCascade* property sheet. Enter the text in the value column.

Moving a cascade menu item
To move the cascade menu item within your menu, drag the IMenuCascade* part to a new location in the IMenu* part.

Setting the initial state
To specify whether the cascade menu item is initially enabled, set the disabled property in the IMenuCascade* property sheet.

Disabling a cascade menu item
To disable the cascade menu item when an event occurs, such as selection of another item, connect the event to the IMenuCascade* disable action.

Enabling a cascade menu item
To enable the cascade menu item when an event occurs, such as selection of another item, do the following:
  1. Connect the event to the IMenuCascade* enable action.
  2. The enable action enables the part by default. If you have changed this default, open settings for the connection, select Set parameters, and set the parameter value to true.


Related procedures
Setting Part Style Properties
Editing Part Labels Directly
Working with VisualAge User Interface Parts

Related references
IMenuCascade
Property Settings -- IMenuCascade
Portability -- IMenuCascade