PopupMenu

Qualified name: delphifmx.PopupMenu

class PopupMenu

Bases: CustomPopupMenu

Represents a pop-up menu. Use TPopupMenu to describe a menu that appears only when the Popup procedure is called. TPopupMenu appears at the coordinates indicated by the parameters of the Popup procedure. TPopupMenu is composed of TMenuItems. You can add menu items 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 TPopupMenu.

Methods

Clear

Clears this TPopupMenu.

CloseMenu

TPopupMenu descendants may implement CloseMenu to define actions made when the pop-up menu closes.

DialogKey

Processes a dialog key for each of the TPopupMenu's TMenuItems.

Popup

Displays the pop-up menu onscreen.

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

MenuItem:

ItemsCount

Represents the number of child TMenuItems of this pop-up 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

PopupComponent

Specifies the control for which the current object is a context menu.

PopupPoint

The point where the pop-up menu opens.

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.

UseParentScale

bool:

VCLComObject

Represents information used internally by components that support COM.

Clear()

Clears this TPopupMenu. Clear removes all the child menu items of this pop-up menu.

CloseMenu()

TPopupMenu descendants may implement CloseMenu to define actions made when the pop-up menu closes. CloseMenu does nothing. It is meant to be implemented by TPopupMenu descendants to describe actions made when the pop-up menu closes.

DialogKey(Key: int, Shift: ShiftState) None

Processes a dialog key for each of the TPopupMenu’s TMenuItems. DialogKey is called during the message preprocessing to handle dialog characters. If the pressed keys match the ShortCut property of one of the TPopupMenu’s TMenuItems, the OnClick event of that TMenuItem is triggered.

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

MenuItem:

ItemsCount

Represents the number of child TMenuItems of this pop-up menu.

Type:

int

Parent

Returns/Sets the Control Visibility

Popup(X: float, Y: float) None

Displays the pop-up menu onscreen. Call Popup to bring up the pop-up menu. The menu appears at the screen coordinates indicated by the values (in pixels) of X and Y.

PopupPoint

The point where the pop-up menu opens.

Type:

PointF

UseParentScale

bool: