MainMenu¶
Qualified name: delphifmx.MainMenu
- class MainMenu¶
Bases:
FmxObject
Describes the structure of the form’s main menu. Use TMainMenu to describe the structure of the form’s main menu. TMainMenu is composed of TMenuItems. Menu items can be added in several ways:
To add a menu item at design time, do any of the following: Right-click the component and select Add Item from the context menu. Double-click the component and click the Add Item button on the Items Designer. Right-click the component, select Items Editor from the context menu, and then click the Add Item button. To add a menu item at run time, use the AddObject procedure of the TMainMenu.
Methods
Performs any necessary actions before the first destructor is called.
Processes a dialog key for every item in the menu.
Exchanges two objects from the children list.
Recreates the OS specific menu.
Attributes
ActionClient
Specifies whether the component object has an associated action.
Children
Stores an array of children attached to this parent component.
ChildrenCount
Read-only property that specifies the number of children in the children list.
ClassName
Returns the TObject.ClassName
ComObject
Specifies the interface reference implemented by the component.
ComponentCount
Returns the owned component count
ComponentIndex
Indicates the position of the component in its owner's Components property array.
ComponentState
Describes the current state of the component, indicating when a component needs to avoid certain actions.
ComponentStyle
Governs the behavior of the component.
Components
Returns an iterator over the owned components
Data
Stores a Tvalue, which is a data structure that can store different kinds of data types.
DesignInfo
Contains information used by the Form designer.
Defines the reference to a TCustomImageList list of images to be used to draw images on the component.
Index
Specifies the index of the child object in the children array attached to this object.
FmxObject:
Represents the number of child menu items of this menu.
Name
Specifies the name of the component as referenced in code.
Observers
Indicates the TObservers object added to the TComponent.
Owner
Returns the Component Owner
Returns/Sets the Control Visibility
Root
Specifies the root parent of this object.
Stored
Specifies whether this object is stored in the .XFM file.
StyleName
Specifies the style name for this FMX component.
Tag
Stores a NativeInt integral value as a part of a component.
TagFloat
Custom property that stores any floating-point value.
TagObject
Custom property that stores any object value.
TagString
Custom property that stores any string value.
VCLComObject
Represents information used internally by components that support COM.
- BeforeDestruction()¶
Performs any necessary actions before the first destructor is called. FMX.Menus.TMainMenu.BeforeDestruction inherits from System.Classes.TComponent.BeforeDestruction. All content below this line refers to System.Classes.TComponent.BeforeDestruction. Performs any necessary actions before the first destructor is called. BeforeDestruction is called automatically immediately before the component’s first destructor executes. Do not call it explicitly in your applications. As implemented in TComponent, BeforeDestruction checks whether the Destroying method has been called, and if not, calls it. Descendants that override this method to perform other actions before a component is destroyed should call the inherited method first to ensure that this check takes place.
- DialogKey(Key: int, Shift: ShiftState) → None¶
Processes a dialog key for every item in the menu. Do not call DialogKey in an application. It is for internal use only.
- Exchange(AObject1: FmxObject, AObject2: FmxObject) → None¶
Exchanges two objects from the children list. FMX.Menus.TMainMenu.Exchange inherits from FMX.Types.TFmxObject.Exchange. All content below this line refers to FMX.Types.TFmxObject.Exchange. Exchanges two objects from the children list. Exchange exchanges AObject1 with AObject2.
- Images¶
Defines the reference to a TCustomImageList list of images to be used to draw images on the component. If the TCustomImageList list is empty, then Images is nil/null. Call ImagesChanged when Images is changed.
- Type:
CustomImageList
- Items¶
FmxObject:
- ItemsCount¶
Represents the number of child menu items of this menu.
- Type:
int
- Parent¶
Returns/Sets the Control Visibility
- RecreateOSMenu()¶
Recreates the OS specific menu.