We use mouse left click to trigger actions in menu items of TPopupMenu. How to trigger different action on mouse middle click in these menu items? In other word, mouse left and middle click on TPopupmenu’s menu items are both different action.
Share
I try to combine 2 answers from author NGLN and come out with the following.
Define a new class inherit from TPopupList:
The Item1Click is an OnClick event handler of TMenuItem that perform based on mouse click:
Note: #32768 is the default window class name for a pop-up menu, see MSDN documentation.