Kbase 18321: ADM2. What Widget or Object is the Owner of a Pop-up Menu ?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/15/2008 |
|
Status: Unverified
GOAL:
ADM2. How to determine in 4GL code, what widget or object a pop-up menu is attached to.
FACT(s) (Environment):
Progress 8.X
Progress 9.X
FIX:
This technique involves using the menu's :OWNER attribute to reference the handle of the owner, and through that handle referencing the owner object's attributes.
1) Define a pop-up menu for an object such as a button.
Add one or two menu items to the pop-up.
2) Define a handle variable in the Definitions section.
3) Define a CHOOSE trigger for one of the menu-items that uses the :OWNER attribute to access the label of the menu owner as follows:
DEFINE VARIABLE wh AS HANDLE NO-UNDO.
ON CHOOSE OF m_Sample DO:
wh = MENU popup-menu-button-1:OWNER.
MESSAGE wh:LABEL VIEW-AS ALERT-BOX.
END.
References to Written Documentation:
Progress Language Reference -- MENU widget, OWNER attribute.