[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Creates and configures a new sub-menu with the specified child menu items.
Source position: menus.pp line 498
function NewSubMenu( |
const ACaption: string; |
hCtx: THelpContext; |
const AName: string; |
const Items: array of TMenuItem; |
TheEnabled: Boolean = True |
):TMenuItem; |
ACaption |
|
Caption text displayed for the sub-menu. |
hCtx |
|
Help context for the sub-menu. |
AName |
|
Name for the menu item representing the sub-menu. |
Items |
|
Array of menu items for the new sub-menu. |
TheEnabled |
|
True if the menu item for the sub-menu is enabled. |
TMenuItem with the sub-menu created in the routine.
NewSubMenu is a TMenuItem function used to create a sub-menu using the values specified in the arguments to the routine. The return value contains the TMenuItem instance created to represent the sub-menu. It uses the value in aCaption as the caption text for the menu item, and AName contains the name for the sub-menu.
The menu item is created using Nil as the owner of the class instance; it must be added or inserted into the Items for the desired menu instance. Each of the menu Items is added to the class instance, and the remaining arguments are assigned to the corresponding properties for the sub-menu (menu item).
Version 3.2 | Generated 2024-02-25 | Home |