The Menu class represents a menu, which is a vertical list of menu items.
Adds a menu or menu item specified by item to the menu.
Adds a separator to the menu.
The zero-based index of the submenu or menu item with a particular caption or -1 if a submenu or menu item with a caption does not exist.
Finds the location of a submenu or menu item with a particular caption in the menu and returns the location where the submenu or menu item is located. If a submenu or menu item with the caption is not found, then the function returns -1.
The text of the menu.
Returns the text of the menu.
The menu or menu item at the specified zero-based index in the menu. If index is less than 0, greater than the number of menu items in the menu or is unspecified, the function returns null.
Returns the submenu or menu item at the specified index.
The number of submenus and menu items in the menu.
Returns the number of submenus and menu items in the menu.
Inserts a menu or menu item specified by item into the menu at a given index. If no index is specified, the menu or menu item is inserted at the end of the menu.
Inserts a separator into the menu at a given index. If no index is specified, the separator is inserted at the end of the menu.
Creates a menu on a form at at a given point.
Removes a menu or a menu item from the menu. If the input is an integer, then the item at the position specified by index is removed. If the input is a menu or menu item, then the item is removed from the menu, wherever it is located.
Enables or disables a menu. If enabled isn't specified, the menu is enabled; otherwise the menu is enabled if enabled is true and disabled if enabled is false.
Sets the menu text specified by label.