Table of Contents

TTMSFNCMenuItem.AddMenuItem Method

Adds a child menu item with the specified text and type, and returns it.

API unit family: TMSFNCPopupMenu Declaring type: TTMSFNCMenuItem

Overloads

Overload 1

Adds a child menu 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 child TTMSFNCMenuItem.

Overload 2

Adds a child menu 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 child TTMSFNCMenuItem.