From Appmethod Libraries
Jump to: navigation, search


Object Pascal

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


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


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


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 Text property can be used to define an accelerator key to the menu item and ShortCut property can be used to assign a keyboard shortcut.

See Also