TMenuItem.Add procedure
Adds item(s) to the menu item.
Declaration
procedure Add(Item: TMenuItem)
procedure Add(const AItems: Array of TMenuItem = class
end
)Arguments
Item | Menu item added to the child Items. |
AItems | Array of menu items added to the child Items. |
Description
Add is an overloaded method used to add one or more items to the
menu. Variants are provided that allow a single TMenuItem instance to be
added, or an array of TMenuItem instances.
The single menu item variant calls Insert to store the value in Item at the position in the Count property. Insert will increment the value in Count.
The array variant iterates over each of the elements in the array, and calls Add to store the menu instances in Items.
Adding a child menu item that is a Separator may crash the application on
non-Windows platforms. Use the AddSeparator method instead.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
