PopupMenu

Inheritance Hierarchy

          IComponent

          IMenu

          IPopupMenu

          PopupMenu

Description

The PopupMenu component is a context menu that appears when a user clicks right mouse button in workspace of a form or a component.

Working with the Component

To create the context menu add the PopupMenu component to the form and set it as the PopupMenu property value of a form or a component.

List of context menu elements is created in the same way as the list for the MainMenu component.

After the menu has been created, it is possible to change the order of menu items by drag-n-dropping them.

If there are no elements in the PopupMenu component it is unavailable.

Example

Properties of the PopupMenu Component

  Property name Brief description
Alignment The Alignment property determines where the context menu should appear relative to the mouse cursor.
AutoPopup The AutoPopup property determines automatic appearance of the context menu on right-click.
ComponentCount The ComponentCount property returns the number of child components.
Components The Components property returns the child component.
Data The Data property stores any custom data.
Images The Images property determines name of the  ImageList  component, the image of which is used in the component.
Items The Items property returns the collection of menu items.
Name The Name property determines the component name.
Tag The Tag property is not used by the compiler. The user can change the value of the Tag property and use it as required.

Methods of the PopupMenu Component

  Method name Brief description
Popup The Popup method displays the context menu in the specified position.

Events of the PopupMenu component

  Event name Brief description
OnClose The OnClose event occurs after closing the context menu.
OnPopup The OnPopup event occurs right before the context menu appears.

See also:

Standard Components