PopupMenu¶
Qualified name: delphifmx.PopupMenu
- class PopupMenu¶
Bases:
CustomPopupMenuRepresents 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
Clears this TPopupMenu.
TPopupMenu descendants may implement CloseMenu to define actions made when the pop-up menu closes.
TPopupMenu.DialogKey(Key: int, Shift: ShiftState) -> None Processes a dialog key for each of the TPopupMenu's TMenuItems.
TPopupMenu.Popup(X: float, Y: float) -> None Displays the pop-up menu onscreen.
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.
MenuItem:
Represents the number of child TMenuItems of this pop-up 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
PopupComponentSpecifies the control for which the current object is a context menu.
The point where the pop-up menu opens.
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.
bool:
VCLComObjectRepresents 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.
- UseParentScale¶
bool: