MainMenu¶
Qualified name: delphifmx.MainMenu
- class MainMenu¶
Bases:
FmxObjectDescribes 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.
TMainMenu.DialogKey(Key: int, Shift: ShiftState) -> None Processes a dialog key for every item in the menu.
TMainMenu.Exchange(AObject1: FmxObject, AObject2: FmxObject) -> None Exchanges two objects from the children list.
Recreates the OS specific menu.
Attributes
ActionClientSpecifies whether the component object has an associated action.
ChildrenStores an array of children attached to this parent component.
ChildrenCountRead-only property that specifies the number of children in the children list.
ClassNameReturns the TObject.ClassName
ComObjectSpecifies the interface reference implemented by the component.
ComponentCountReturns the owned component count
ComponentIndexIndicates the position of the component in its owner's Components property array.
ComponentStateDescribes the current state of the component, indicating when a component needs to avoid certain actions.
ComponentStyleGoverns the behavior of the component.
ComponentsReturns an iterator over the owned components
DataStores a Tvalue, which is a data structure that can store different kinds of data types.
DesignInfoContains information used by the Form designer.
Defines the reference to a TCustomImageList list of images to be used to draw images on the component.
IndexSpecifies 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.
NameSpecifies the name of the component as referenced in code.
ObserversIndicates the TObservers object added to the TComponent.
OwnerReturns the Component Owner
Returns/Sets the Control Visibility
RootSpecifies the root parent of this object.
StoredSpecifies whether this object is stored in the .XFM file.
StyleNameSpecifies the style name for this FMX component.
TagStores a NativeInt integral value as a part of a component.
TagFloatCustom property that stores any floating-point value.
TagObjectCustom property that stores any object value.
TagStringCustom property that stores any string value.
VCLComObjectRepresents 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.