MENUITEM Statement

The MENUITEM resource-definition statement creates a menu item.

Syntax

MENUITEM text, result, [[optionlist]]  MENUITEM SEPARATOR
 

Parameters

text
A string that indicates the name of the menu item.

The string can contain the escape characters \t and \a. The \t character inserts a tab in the string and is used to align text in columns. Tab characters should be used only in menus, not in menu bars. (For information on menus, see POPUP Resource.) The \a character aligns all text that follows it flush right to the menu bar or pop-up menu.

result
A number that specifies the result generated when the user selects the menu item. This parameter takes an integer value. Menu-item results are always integers; when the user clicks the menu-item name, the result is sent to the window that owns the menu.
optionlist
This parameter specifies the appearance of the menu item. This optional parameter takes one or more redefined menu options, separated by commas or spaces. The menu options are as follows:
Option Description
CHECKED Menu item has a check mark next to it.
GRAYED Menu item is initially inactive and appears on the menu in gray or a lightened shade of the menu-text color. This option cannot be used with the INACTIVE option.
HELP Identifies a help item.
INACTIVE Menu item is displayed but it cannot be selected. This option cannot be used with the GRAYED option.
MENUBARBREAK Same as MENUBREAK except that for pop-up menus, it separates the new column from the old column with a vertical line.
MENUBREAK Places the menu item on a new line for static menu-bar items. For menus, it places the menu item in a new column with no dividing line between the columns.

SEPARATOR
The MENUITEM SEPARATOR form of the MENUITEM statement creates an inactive menu item that serves as a dividing bar between two active menu items on a menu.

Example

The following example demonstrates the use of the MENUITEM and MENUITEM SEPARATOR statements:

MENUITEM "&Roman", 206, CHECKED, GRAYED
MENUITEM SEPARATOR
MENUITEM "&Blackletter", 301 
 

See Also

MENU, POPUP