onMenuFill - event of object PmiItem

The event fires on clicking by the right mouse button over the item. In this event it is possible to fill in the menu, thus it is the request to create the menu. The event is called each time the menu is displayed and therefore the menu may have different content each time, created by this script.

If the user selects some item from the local menu then the onMenuSelect event is called.

pMe(Object) Reference to the graphic item where the event rises.
pEvent(Object) A referrence to object describing detailed information about the specific event.
pEvent.Menu - (Object) Object of the PmMenu type that represents the list of menu (local or system) items. At the beginning this object has no items. In this event it is possible to fill in this object with requested items by means of the AddMenu method and to create an arbitrary menu. Caution! It is not allowed to save the reference to this object for the later use.
- This event will be called only if the Control enabled configurator is checked.
- This event is also functional for Web Panels.
- This event is not functional for graphic item: PmiRoot, PmiAx.
The event is called in the PmiButton item also if the left mouse button is pressed if configured in Open the local menu also by left mouse button.
See: Example for JavaScript or Example for VBScript in description of the PmMenu object
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice