In addition to items that perform actions, menus can contain separators and items that open submenus.

Separators

A separator is a horizontal line in a menu that cannot be selected or perform any action. Separators help you group items on a menu. To add a separator to a menu, select the line after which you want to insert it and click the Separator button in the Menu Designer

Submenus and Menu Levels

Menu items can be nested, that is, when you click a menu item, another menu can open.

You define submenus in the Menu Designer by indenting one or more menu items. To indent a submenu, select it and click the right-arrow button. The indented item becomes a menu item on a submenu.

In the Properties window of a menu item, when the menu item is created the MenuLevel property is set to the default value of zero. As the item are indented, the MenuLevel is set to 1, 2, 3 and so on—one level for each click on the indentation button (you can cancel indentation by clicking the left-arrow button—each click cancels one level of indentation).

There are a few logical rules that you must follow when creating submenus:

  • At least one item in each menu must have MenuLevel 0 (zero).

  • Each MenuLevel can only be one level higher than the preceding level in the list.

  • If a higher MenuLevel follows a lower one (for example, 1 follows 0), the menu item with the MenuLevel 0 opens the submenu, and the item with MenuLevel 1 becomes an item on this submenu. A menu item that opens a submenu cannot have any action associated with it.

  • There can be up to 10 menu levels (numbered from 0 to 9).

  • If the MenuLevel reverts to lower numbers (with a lesser indentation), the menu items become items in a previous menu at the level indicated by the MenuLevel.

  • Separators cannot open submenus. Separators can only separate items that are on the same level. This means that you cannot put a separator as the first, last, or only item on a menu or submenu.

See Also