PML Customisation
User Guide
Menus
:
Defining a Bar Menu Gadget
: Finding Who Popped up a Menu
Finding Who Popped up a Menu
You can find out whether a menu was popped up from a gadget, and if so, the gadget’s name. The method is:
!menu.popupGadget() is GADGET
If the menu was a popup on a gadget then the returned
GADGET
variable is a reference to the gadget. If the menu was popped up from a pulldown-menu or from a popup on the form itself, the value is
UNSET
.
Example:
!g = !menu.popupGadget()
if !g.set() then
!n = !g.name()
$p menu popped up by gadget $!n
else
!n = menu.owner().name()
$p menu popped up by form $!n
endif
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.