FMX.Menus.TMenuItem

From RAD Studio API Documentation
Jump to: navigation, search

FMX.Controls.TTextControlFMX.Controls.TStyledControlFMX.Controls.TControlFMX.Types.TFmxObjectSystem.Classes.TComponentSystem.Classes.TPersistentSystem.TObjectTMenuItem

Delphi

TMenuItem = class(TTextControl, IItemsContainer, INativeControl, IGroupName, IGlyph, IKeyShortcut, IIsChecked)

C++

class PASCALIMPLEMENTATION TMenuItem : public Fmx::Controls::TTextControl

Properties

Type Visibility Source Unit Parent
class public
FMX.Menus.pas
FMX.Menus.hpp
FMX.Menus FMX.Menus

Description

TMenuItem describes the properties of a menu item.

TMenuItem represents an item in a menu such as TMenuBar, TMainMenu, or TPopupMenu.

To add a TMenuItem to a menu, use the AddObject procedure of that menu. For example, use FMX.Types.TFmxObject.AddObject to add a TMenuItem to a TMenuBar.

You can add submenu items to the current TMenuItem by using the AddObject procedure of the TMenuItem. Use GetItem and GetItemsCount to retrieve information about the submenu items of the current TMenuItem.

Use AutoCheck, GroupIndex, IsChecked, or RadioItem to control whether and how the TMenuItem is checked.

The ShortCut property can be used to assign a keyboard shortcut.

The Text property can be used to define an accelerator key to the menu item of a TMainMenu.

See Also