TTMSFNCCustomPopupMenu.AddMenuItem Method
Adds a new top-level item with the given text and type and returns it.
API unit family: TMSFNCPopupMenu
Declaring type: TTMSFNCCustomPopupMenu
Overloads
Overload 1
Adds a new top-level item with the given text and type and returns it.
function AddMenuItem(AText: string; AType: TTMSFNCMenuItemType = mitDefault): TTMSFNCMenuItem; overload;
Parameters
| Name | Description |
|---|---|
AText |
Display text of the new item. |
AType |
Rendering type of the new item. Default is mitDefault. |
Returns
The newly created TTMSFNCMenuItem.
Overload 2
Adds a new top-level item that wraps the given action and returns it.
function AddMenuItem(AAction: TAction): TTMSFNCMenuItem; overload;
Parameters
| Name | Description |
|---|---|
AAction |
Action whose caption, hint, and OnExecute are applied to the item. |
Returns
The newly created TTMSFNCMenuItem.