Returns the number of an item on a menu defined with DEFINE POPUP or the Visual FoxPro system menu.
Syntax
GETBAR(MenuItemName, nMenuPosition)
Returns
Numeric
Arguments
MenuItemName
Specifies the menu item.
nMenuPosition
Specifies a position on the menu. nMenuPosition can range from 1 through the number of items within the menu. 1 corresponds to the first item on the menu, 2 to the second item, and so on.
Remarks
Use GETBAR( ) to determine which item occupies a specific position on a menu. This function is useful when items on a menu are added, removed, or rearranged. Use DEFINE BAR to add an item to a menu or RELEASE BAR to remove an item. The position of items in a menu can be changed if MOVER is included when the menu is created with DEFINE POPUP.