Page History
...
Note that you can use the same popup menu with more than one component. For example in a explorer-type interface (a tree view on the left and a list view on the right), you would typically use just one popup menu:
DEFINE_COM CLASS(#PRIM_TRVW) NAME(#TREEVIEW) POPUPMENU(#PMNU_1)
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#LISTVIEW) POPUPMENU(#PMNU_1)
Then for every single menu item in the popup menu, you would write the code to perform an action depending on the type of item selected. In this example the tree view key columns are sourced from the #DEPTMENT and #SECTION fields, and the list view key column is sourced from the #EMPNO field:
EVTROUTINE HANDLING(#MiDetail.click)
if '#empno *ne *blanks'
invoke #EmpForm.activateForm
set #EmpForm emp_value(#empno) emp_dept(#deptment) emp_sect(#section)
else
if '#section *ne *blanks'
invoke #SecForm.activateform
set #SecForm dept_value(#deptment) sect_value(#section) top(#std_num)
else
if '#deptment *ne *blanks'
invoke #DeptForm.activateform
set #DeptForm dept_value(#deptment)
endif
endif
endif
ENDROUTINE
&<img src="../resources/images/opentoc-dark.png" title="Open Contents List" border="0"&>