TMenuItem - The base structure of each item in a Menu.

TMenuItem - The base structure of each item in a Menu.

This Component does the hard work of processing the Items found in the various types of menus. It defines a lot of the properties and methods used in the various sorts of menu, including TMainMenu, TMenu and TPopUpMenu

Menu Action Link Menu Action Link: defines the link between a selected menu item and its corresponding action Action - the default action associated with this Menu Item AutoCheck: Whether a check mark is automatically added when the item is selected Caption: The text that appears on the Menu Bar at run-time Checked: whether a check mark appears on the Menu Bar Default: is this option the default selection? If so, it usually appears in Bold and is selected by hitting ENTER Enabled: can this option be selected? If Not Enabled, usually 'greyed-out' BitMap: an optional picture beside the MenuItem Caption GroupIndex: the sequence number in a group of mutually exclusive RadioItem choices HelpContext - an index to the context-sensitive help string to be used Hint: a pop-up help message that appears when the mouse hovers over an item. ImageIndex - number in a list of images for use in illustrating menu items RadioItem: whether the item is part of a group of mutually exclusive choices. RightJustify: the position of the Caption in the Menu Panel. Default (False) is Left Justify ShortCut - the quick key sequence to be used in selecting this menu item

ShortCut - the quick key sequence to be used in selecting this menu item

If you select this property in the Object Inspector, a list-box will appear with choices for various key-combinations to be used. The chosen key-sequence will be displayed, at run-time, on the menu drop-down next to the caption for the menu item.

SubMenuImages - will images be shown for sub-menu items as well as the main item? Visible - can the item be seen? OnClick - event handler for selection of this menu item TMenu: The base class for all menus

TMenu: The base class for all menus

The class definition contains very few public or published properties or methods accessible to the application programmer, but contains the entry Items which points to the Menu Items that appear in the menu displays

Items - a list of Menu Items to be included in the menu display Images - a list of images from which entries can be selected to illustrate menu choices TMainMenu - the Main Menu that appears at the top of most windows

TMainMenu - the Main Menu that appears at the top of most windows; form designers can customise by choosing various menu items.

Main Menu is a non-visible component : that is, if the icon is selected from the Component Pallete and placed on the Form, it will not appear at Run-time. Instead, a Menu bar with a structure defined by the Menu Editor will appear.

To see the Menu Editor, right-click on the Main Menu icon on your Form.

TPopupMenu - a menu panel that pops up on the desktop when the right mouse button is clicked

TPopupMenu: a menu panel that pops up on the desktop when the right mouse button is clicked.

Inherits all the properties of TMenu (including the properties of TMenuItem), but has some new properties (procedure PopUp and procedure Close) that define its behaviour when actually invoked.

PopupPoint defines the position of the Popup menu, usually at the current cursor position.

To use a Popup menu, first create it with the MenuEditor. Then with the Object Inspector for the control that needs to use the Popup, select the property named PopupMenu, and a listbox will appear with the names of the available Menus - choose the Popup name you want

HowToUseMenus - hints for creating Menus for your Forms

HowToUseMenus - hints for creating Menus for your Forms

TMainMenu is the Main Menu that appears at the top of most forms; form designers can customise by choosing various menu items. TPopupMenu is a menu window that pops up with pertinent, usually context-sensitive, details and choices when the right mouse button is clicked near a control

Main Menu is a non-visible component : that is, if the icon is selected from the Component Palette and placed on the Form, it will not appear at Run-time. Instead, a Menu bar with a structure defined by the Menu Editor will appear. Popup menus, placed on the form by selecting the icon from the Component Palette, do not appear at all unless the right mouse button is clicked on a control that owns such a menu.

To see the Menu Editor, right-click on the Main Menu or Popup Menu icon on your Form. A pop-up box appears, that invites you to enter items into the Menu bar.

An Edit box is displayed, containing a Button labelled New Item1. If you right-click on that box, a pop-up menu is displayed that allows you to add a new item before or after (along the same level) or create a sub-menu with the opportunity to add further items below (or above) the new item in a downward column.

Any or all of the items that you add can be configured using the Object Inspector.

At the least you should give each item a Caption which will appear on the Menu Bar (you may also wish to give it a more meaningful name). The caption should indicate the activity to be selected, such as "File Open" or "Close", "Run" or "Quit"

If you want a particular letter in the Caption to be associated with a shortcut key, that letter should be preceded by an ampersand. The Menu item at run-time will appear with the shortcut letter underlined, and hitting that letter key will have the same effect as selecting the menu item. Alternatively you can choose a shortcut key sequence (such as Ctrl-C for Copy or Ctrl-V for Paste - the standard Keyboard shortcuts) with the ShortCut property of the MenuItem