Current location - Recipe Complete Network - Complete cookbook of home-style dishes - How to write powerbuilder right-click pop-up menu? Seek the source code! ! !
How to write powerbuilder right-click pop-up menu? Seek the source code! ! !
1. Make a menu object first, mainly the content after you right-click. Events and codes are the same as ordinary menus. Don't attach it to any window object!

2. It is ok to add the following code to the object by using the right-click event (rbuttondown).

m_popmenu_pub sysmenu

sysmenu = CREATE m_popmenu_pub

sysmenu.m_sysdata。 PopMenu(xpos、ypos)

Explain: m_popmenu_pub is the name of the menu object I created, sysmenu is the name of this menu instance, and m_sysdata is the name of your first-level menu ~ ~ ~ Pay attention to the last sentence, and if there is any mistake, modify it to:

sysmenu.m_sysdata。 PopMenu (parent. PointerX (), parent. PointerY())