Skip to main content
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.

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 child TTMSFNCMenuItem.

Overload 2

Adds a child menu item that wraps the specified 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 child TTMSFNCMenuItem.