Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
DelphiFMX Documentation
Light Logo Dark Logo
DelphiFMX Documentation
  • Installation
  • Tutorials & Guides
    • Quickstart
    • Example Gallery
    • Frequently Asked Questions
  • Reference Manual
    • DelphiFMX
      • Action
      • ActionList
      • CustomAction
      • CustomActionList
      • CustomViewAction
      • AdapterListView
      • AppearanceListView
      • CustomListView
      • ListView
      • ListViewBase
      • PresentedListView
      • AniIndicator
      • ArcDial
      • BitmapTrackBar
      • Button
      • CalloutPanel
      • CheckBox
      • CornerButton
      • CustomButton
      • CustomCornerButton
      • CustomSwitch
      • CustomTrack
      • Expander
      • ExpanderButton
      • GroupBox
      • ImageControl
      • Label
      • Panel
      • PathLabel
      • PresentedTextControl
      • ProgressBar
      • RadioButton
      • ScrollBar
      • SizeGrip
      • SmallScrollBar
      • SpeedButton
      • Splitter
      • StatusBar
      • Switch
      • Thumb
      • ToolBar
      • Track
      • TrackBar
      • Arc
      • CalloutRectangle
      • CaretRectangle
      • Circle
      • CustomPath
      • Ellipse
      • Image
      • Line
      • PaintBox
      • Path
      • Pie
      • Rectangle
      • RoundRect
      • Selection
      • SelectionPoint
      • Shape
      • Text
      • BaseBindScopeComponent
      • BaseLinkingBindSource
      • BasicBindComponent
      • BindComponentDelegate
      • BindingsList
      • ContainedBindComponent
      • CustomBindingsList
      • CustomLinkControlToField
      • CustomLinkListControlToField
      • CustomLinkPropertyToField
      • LinkControlDelegate
      • LinkControlToField
      • LinkControlToFieldDelegate
      • LinkListControlToField
      • LinkPropertyToField
      • LinkPropertyToFieldDelegate
      • BaseObjectBindSource
      • CustomPrototypeBindSource
      • PrototypeBindSource
      • BaseValueRange
      • CustomValueRange
      • CustomValueRangeAction
      • FileExit
      • FileHideApp
      • FileHideAppOthers
      • HintAction
      • ObjectViewAction
      • SysCommonAction
      • ValueRange
      • ValueRangeAction
      • ViewAction
      • VirtualKeyboard
      • WindowClose
      • BasicAction
      • Collection
      • Component
      • Persistent
      • Strings
      • Bounds
      • ControlSize
      • CustomPopupMenu
      • FmxObject
      • Position
      • BufferedLayout
      • CustomBufferedLayout
      • CameraComponent
      • CustomMediaCodec
      • CustomMediaPlayerAction
      • Media
      • MediaPlayer
      • MediaPlayerControl
      • MediaPlayerCurrentTime
      • MediaPlayerPlayPause
      • MediaPlayerStart
      • MediaPlayerStop
      • MediaPlayerValue
      • MediaPlayerVolume
      • CheckColumn
      • Column
      • CurrencyColumn
      • CustomGrid
      • CustomNumberColumn
      • DateColumn
      • DateTimeColumn
      • DateTimeColumnBase
      • FloatColumn
      • GlyphColumn
      • Grid
      • ImageColumn
      • IntegerColumn
      • PopupColumn
      • ProgressColumn
      • StringColumn
      • StringGrid
      • TimeColumn
      • ColorBox
      • ColorButton
      • ColorComboBox
      • ColorListBox
      • ColorPanel
      • ColorPicker
      • ColorQuad
      • ComboColorBox
      • CustomColorComboBox
      • GradientEdit
      • ComboBox
      • CustomComboBox
      • CustomListBox
      • ListBox
      • ListBoxItem
      • ComboEdit
      • ComboEditBase
      • CustomComboEdit
      • CommonCustomForm
      • CustomForm
      • CustomPopupForm
      • Form
      • Frame
      • ContainedAction
      • ContainedActionList
      • Control
      • CustomControlAction
      • Popup
      • StyledControl
      • StyleBook
      • TextControl
      • CustomEditBox
      • CustomMemo
      • Memo
      • CustomMultiView
      • MultiView
      • CustomPresentedFramedScrollBox
      • CustomPresentedFramedVertScrollBox
      • CustomPresentedHorzScrollBox
      • CustomPresentedScrollBox
      • CustomPresentedVertScrollBox
      • PresentedFramedScrollBox
      • PresentedFramedVertScrollBox
      • PresentedHorzScrollBox
      • PresentedScrollBox
      • PresentedVertScrollBox
      • CustomScrollBox
      • FlowLayout
      • FramedScrollBox
      • FramedVertScrollBox
      • GridLayout
      • GridPanelLayout
      • HorzScrollBox
      • Layout
      • ScaledLayout
      • ScrollBox
      • VertScrollBox
      • Edit
      • CustomEdit
      • FMXBindNavigateAction
      • FMXBindNavigateApplyUpdates
      • FMXBindNavigateDelete
      • FMXBindNavigateEdit
      • FMXBindNavigateFirst
      • FMXBindNavigateInsert
      • FMXBindNavigateLast
      • FMXBindNavigateNext
      • FMXBindNavigatePost
      • FMXBindNavigatePrior
      • FMXBindNavigateRefresh
      • FMXBindNavigateCancel
      • FMXBindNavigateCancelUpdates
      • MainMenu
      • MenuBar
      • MenuItem
      • PopupMenu
      • Object
      • OpenDialog
      • Point
      • PointF
      • Rect
      • RectF
      • Size
      • SizeF
      • SearchBox
      • SpinBox
      • StyleManager
      • Stream
      • StyleStreaming
      • TabControl
      • TabItem
  • Changelog
    • v1.0.3
    • v1.0.4
    • v1.0.5
    • v1.0.6
  • Contributing
Back to top

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

BeforeDestruction

Performs any necessary actions before the first destructor is called.

DialogKey

TMainMenu.DialogKey(Key: int, Shift: ShiftState) -> None Processes a dialog key for every item in the menu.

Exchange

TMainMenu.Exchange(AObject1: FmxObject, AObject2: FmxObject) -> None Exchanges two objects from the children list.

RecreateOSMenu

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.

Images

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.

Items

FmxObject:

ItemsCount

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

Parent

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.

Next
MenuBar
Previous
FMXBindNavigateCancelUpdates
Copyright © 2020-2023, Embarcadero Python Dev Team
Made with Sphinx and @pradyunsg's Furo
On this page
  • MainMenu
    • MainMenu
      • MainMenu.BeforeDestruction()
      • MainMenu.DialogKey()
      • MainMenu.Exchange()
      • MainMenu.Images
      • MainMenu.Items
      • MainMenu.ItemsCount
      • MainMenu.Parent
      • MainMenu.RecreateOSMenu()