Control - PopupMenu Property

Reference to a PopupMenu to be shown on a right click

Member of Control (PRIM_CTRL)

Data Type - PRIM_PMNU - Popup Menu

Details

The PopupMenu property specifies the PopupMenu to be shown on a right click.

Example

In this example, a Popup is attached to the main page.
Begin_Com Role(*EXTENDS #PRIM_FORM) Height(456) Width(864) Popupmenu(#PopupMenu)
 
   Define_Com Class(#PRIM_PMNU) Name(#PopupMenu)
   Define_Com Class(#PRIM_MITM) Name(#MenuItem1) Caption('Item1') Displayposition(1) Parent(#PopupMenu)
   Define_Com Class(#PRIM_MITM) Name(#MenuItem2) Caption('Item2') Displayposition(2) Parent(#PopupMenu)
   Define_Com Class(#PRIM_MITM) Name(#MenuItem3) Caption('Item3') Displayposition(3) Parent(#PopupMenu)
 
   Define_Com Class(#PRIM_LABL) Name(#Label) Displayposition(1) Ellipses(Word) Height(42) Left(6) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(7) Verticalalignment(Center) Width(195) Alignment(Center) Caption('Right click to see the menu')
 
   Evtroutine Handling(#MenuItem1.Click #MenuItem2.Click #MenuItem3.Click) Com_Sender(#Sender)
 
      #Label := #Sender.Caption
 
   Endroutine
 
End_Com

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2