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_Mlm_M = parent.menuidPopMenu( lm_M.m_menutoshow, w_mdiframe.PointerX(), w_mdiframe.PointerY() )

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: