Table of Contents

TTMSFNCMenuItems.AddMenuItem Method

Appends a new item with the specified text and type and returns it.

API unit family: TMSFNCPopupMenu Declaring type: TTMSFNCMenuItems

Overloads

Overload 1

Appends a new item with the specified 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

Appends a new item that wraps the specified 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.