Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: PowerBuilder
Expertise: Beginner
Oct 11, 1999



Application Security Testing: An Integral Part of DevOps

Custom Right-Mouse-Click Menus

How do I customize the mouse's right-click menu? That is, instead of Cut, Copy, Paste, Select All, Delete in Edit-Masks, etc., I would like to display my custom menu, which includes Save, Refresh, etc.

In order to have your own custom menus you need to define the menu in the normal manner through the menu painter. Alternatively, you can use a sub-menu from your Sheets menu. (This is the option that most people choose.)

Then use the PopMenu function to display the menu when the user clicks the right mouse button. To achieve this, you need to add a script such as this to the rbuttondown event:

m_mymdimenu lm_M

lm_M = parent.menuid
PopMenu( lm_M.m_menutoshow, w_mdiframe.PointerX(), w_mdiframe.PointerY() )
DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date