[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Insert stores the specified menu item at the location indicated by Index.
Source position: menus.pp line 279
public procedure TMenuItem.Insert( |
Index: Integer; |
Item: TMenuItem |
); |
Index |
|
Ordinal position in Items where the menu item is inserted. |
Item |
|
Menu item inserted in Items. |
No actions are performed in the method when Item is unassigned (contains Nil).
A catchable debugger exception is raised if the Parent in Item is already assigned. The exception message is 'Menu inserted twice'.
Insert ensures that the TMenuItems storage has been allocated for the TMenuItem instances in the Items property.
Insert modifies Item to use the current class as the Parent for the menu item, and assigns the private method used in the OnChange handler in Item. If Item is Visible, its handle is allocated when not already assigned.
MenuChanged is called to signal the OnChange event handler when assigned.
Insert is called from the Add method, and when the Parent menu item is changed after setting a new value in the MenuIndex property.
|
Provides indexed access to the child menu items for the current class instance. |
|
|
The parent menu item for the class instance. |
|
|
Indicates whether the menu item is visible (True) or hidden (False). |
|
|
Event handler signalled when a menu item in Items has been changed. |
|
|
Implements a list used to store TMenuItem instances with a given parent. |
Version 3.2 | Generated 2024-02-25 | Home |