Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


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

Custom Right-Mouse-Click Menus

Question:
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.

Answer:
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.

 

 

Sitemap