[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Creates and configures a new menu item instance.
Source position: menus.pp line 501
function NewItem( |
const ACaption: string; |
AShortCut: TShortCut; |
AChecked: Boolean; |
TheEnabled: Boolean; |
TheOnClick: TNotifyEvent; |
hCtx: THelpContext; |
const AName: string |
):TMenuItem; |
ACaption |
|
Caption text for the new menu item. |
AShortCut |
|
Short cut for the new menu item. |
AChecked |
|
True if the new menu item is checked. |
TheEnabled |
|
True if the new menu item is enabled. |
TheOnClick |
|
OnClick handler for the new menu item. |
hCtx |
|
Help context for the new menu item. |
AName |
|
Name assigned for the new menu item. |
Menu item instance created in the routine.
NewItem is a TMenuItem function used to create and configure a new menu item instance using the values passed in the arguments to the routine. The TMenuItem instance is created with its Owner property set to Nil. Values passed in the parameters are assigned to the corresponding properties in the TMenuItem instance in the return value.
Other property values for the menu item can be assigned in the calling routine. Use the Add or Insert method in the desired menu or sub menu to store the new menu item instance.
|
Contains the menu items displayed on the menu. |
|
|
Represents a menu item displayed in a menu. |
|
|
Provides indexed access to the child menu items for the current class instance. |
|
|
Adds item(s) to the menu item. |
|
|
Insert stores the specified menu item at the location indicated by Index. |
Version 3.2 | Generated 2024-02-25 | Home |