Menu Item Menu Item: The base structure of each menu item.
This Component does the hard work of processing the Items found in the various types of menus
Menu Action Link Menu Action Link: defines the link between a selected menu item and its corresponding action Auto Check Auto Check: Whether a check mark is automatically added when the item is selected Caption Caption: The text that appears on the Menu Bar at run-time Checked Checked: boolean to show whether a check mark appears on the Menu Bar Default Defult: boolean to determine whether this option is the default selection; if so, it usually appears in Bold and is selected by hitting ENTER Enabled Enabled: able to be selected. If Not Enabled, usually 'greyed-out'. Bit Map Bit Map: an optional picture beside the MenuItem Caption Group Index Group Index: the sequence number in a group of mutually exclusive RadioItem choices Hint Hint: a pop-up help message that appears when the mouse hovers over an item. Radio Item Radio Item: boolean to determine whether the item is part of a group of mutually exclusive choices. Right Justify Right Justify: the position of the Caption in the Menu Panel. Default (False) is Left Justify Menu Menu: The base structure for all menus Main Menu 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. A pop-up 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" and if you want a particular letter 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
Each menu item must also be associated with an Action, again defined from the Object Inspector.
Select the Events tab in the Object Inspector, click on the 'OnClick' event and proceed to insert the code into the Source Editor for the actions to be associated with that menu choice.
Do the same for all the Menu Items you have created.
For further details of the properties of each Menu Item, see the description of TMenuItem; see also the description or TMenuActionLink which defines how the action is to be associated with the menu item.
Pop-up Menu Pop-up Menu: 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.