Skip to main content
Table of Contents

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.

FMX.TMSFNCPopupMenu.hppPascalC++
function AddMenuItem(AText: string; AType: TTMSFNCMenuItemType = mitDefault): TTMSFNCMenuItem; overload;
TTMSFNCMenuItem* __fastcall AddMenuItem(System::UnicodeString AText, TTMSFNCMenuItemType AType = (TTMSFNCMenuItemType)(0x0))/* 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.

FMX.TMSFNCPopupMenu.hppPascalC++
function AddMenuItem(AAction: TAction): TTMSFNCMenuItem; overload;
TTMSFNCMenuItem* __fastcall AddMenuItem(Fmx::Actnlist::TAction* AAction)/* overload */;

Parameters

Name Description
AAction Action whose caption, hint, and OnExecute are applied to the item.

Returns

The newly created TTMSFNCMenuItem.