FMX.Menus.TMenuItem
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
- FMX.Menus.TMenuBar
- FMX.Menus.TMainMenu
- FMX.Menus.TPopupMenu
- FMX.Types.TFmxObject.AddObject
- FMX.Types.TFmxObject.AddObject
- FMX.Types.TFmxObject.AddObject
- FMX.Menus.TMenuItem.GetItem
- FMX.Menus.TMenuItem.GetItemsCount
- FMX.Menus.TMenuItem.AutoCheck
- FMX.Menus.TMenuItem.GroupIndex
- FMX.Menus.TMenuItem.IsChecked
- FMX.Menus.TMenuItem.RadioItem