Highlighted
Trusted Contributor.
Trusted Contributor.
838 views

Grid and pop-up menu

His there a way to have a pop-up menu different on each cell?

0 Likes
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Grid and pop-up menu

Not that I know of. The grid itself can have a pop-up menu, but not each individual cell.
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Grid and pop-up menu

While you may not be able to pop up a menu, you could monitor the right click in each cell and then display a window when the right click occurs. The grid has a right click event, you then inquire on the grid to see where this occured, then display a window with whatever information you want. Here is a very simple example:
Screen1-Gd-1-Ev-Msg-Grid-Rbutton-Down.
inquire Screen1-Gd-1 x=x1 y=y1
if x1=2 and y1=2 perform show-2x2-menu.

show-2x2-menu.
display message box "choose me"

0 Likes
Highlighted
Visitor.

RE: Grid and pop-up menu

I recently had a similar need for a grid pop up menu to be triggered in a specific column. So the grid has a menu and if the column is right clicked a different pop up menu is displayed instead. My solution, was similar to Steve's, but instead of display message box I used the popup menu utility, the syntax...
call 'w$menu' using wmenu-popup, Screen1-Column-Popup-Handle
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.