Menus to be used in Forms created with the Lazarus IDE
EMenuError

- Exception handler for error in Menu access
TMenuItem
- An item of a TMainMenu or TPopupMenu.

TMenuItem - An item of a TMainMenu or TPopupMenu.

no errors
TMenuActionLink
: defines the link between a selected menu item and its corresponding action

TMenuActionLink defines the link between a selected menu item and its corresponding action. Properties are protected and not readily accessible by application programmers.

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

ActionChange
- changes the action associated with this menu item to a new action
ActionChange
- changes the action associated with this menu item to a new action, provided Sender is of type TCustomAction
GetAction
- find the action associated with this menu item
GetActionLinkClass
- find out what class of action link is associated with this menu item
GetHandle
- get the operating system handle for the menu to which this item belongs
DoClicked
- process the system message signifying that a click has ocurred over this menu item
CreateHandle
- create an operating system handle for this item
DestroyHandle
- destroy the operating system handle and free space on the heap
InitiateActions
- start the initiation phase of the actions associated with the menu item
MenuChanged
- rebuild it if True
SetAction
- setup a new action associated with the menu item
SetGroupIndex
- write the index value for group to this item belongs (may write a new group)
SetImageIndex
- gives the item an index value for its associated image
SetShortCut
- sets up the keyboard shortcut for this item
SetVisible
- sets up whether the item is to be visible
UpdateImages
- update all images associated with the item
ImageListChange
- change the image list if commanded by the Sender
ActionLink
- a link to the action for this menu item
GetImageList
- Get the list of images for this menu, from which the image for the current item will be selected
GetParentMenu
- returns the parent menu to which this menu item belongs
HandleAllocated
- has an operating system handle been allocated?
HasIcon
- is there an icon associated with this menu item?
InitiateAction
- start th einitiation phase of an action associated with the menu item
IndexOf
- the index value of this item
IndexOfCaption
- the index value of the caption for this item
VisibleIndexOf
- the index of this item within the list of visible items
IsCheckItem
- is there a check-box associated with this item?
Add
- an item to the menu
AddSeparator
(a line) to the menu
Click
- simulate the OnClick event
Delete
this item from the menu
HandleNeeded
- tell the operating system that a handle is needed for this item
Insert
a new item at the location marked by Index
RecreateHandle
from the operating system
Remove
this item from the menu
IsInMenuBar
- this item appears in the main menu bar
Clear
- removes the contents of the item, but leaves the item in place
HasBitmap
- determines whether there is a Bitmap for this item
GetIconSize
- finds the size of the icon for this item
Count
- number of items
Handle
- the operating system handle for this item
Items
- the indexed list of menu items to which this item belongs
MenuIndex
- the index value of the menu to which this item belongs
Parent
- the parent from which this item is derived
Command
- the entry from the Command list to which this item refers
MenuVisibleIndex
- the index value of the visible menu
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 MenuItems 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.

It is often helpful to use the Menu controls in conjuction with an ActionList which contains a series of standard or customised Actions. Menu Items can be linked in the Object Inspector to Actions on the list, and the same actions can be linked to Buttons, ToolBar Buttons, SpeedButtons etc. It is obviously economic of effort to re-use the same code to respond to the various events, rather than writing separate OnClick event handlers for each individual control.

By default a number of standard actions is pre-loaded from StdActns or, if DataAware controls are being used, from DBActns, and these can be chosen using the ActionList editor which appears when you right-click on the ActionList icon on the Form Designer.

BitmapChange
- update the image associated with the menu item when the Bitmap has been changed
UpdateImage
- freshen the image associated with the menu item, particularly if it has changed
UpdateWSIcon
- update the icon in the current Widget Set for this menu item
Find
the identity given menu item (named in ACaption)
GetIsRightToLeft
- find the value of the property determining whether right-to-left read/write is enabled
IsLine
- if true, this item is a line (separator) on the menu
Menu
- the menu to which this item belongs
WriteDebugReport
- used in debugging