[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Creates and configures a new menu instance with the specified menu items.
Source position: menus.pp line 493
function NewMenu( |
Owner: TComponent; |
const AName: string; |
const Items: array of TMenuItem |
):TMainMenu; |
Owner |
|
Component which owns the new menu instance. |
AName |
|
Name for the new menu instance. |
Items |
|
Array with the menu items for the new menu instance. |
TMainMenu instance created in the routine.
NewMenu is a TMainMenu function used to create and configure a new menu instance using the values passed in the arguments to the routine. The return value is a TMainMenu instance created using the component in Owner as the owner for the class instance. The value in AName is used in the Name property for the new menu instance.
NewMenu calls an implementation routine to add the menu Items to the new menu instance. It ensures that the Owner for the menu items are updated to reflect the Owner for the new menu instance, and that they are inserted into the Owner component.
Version 3.2 | Generated 2024-02-25 | Home |