Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

Finding Who Popped up a Menu

  • Last UpdatedNov 12, 2025
  • 1 minute read
  • Use the following method to find out whether a menu was popped up from a gadget, and if so, the gadget’s name:

    !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

TitleResults for “How to create a CRG?”Also Available in