What is the component a popup menu click originated from

Posted by Ralph Rickenbach on Stack Overflow See other posts from Stack Overflow or by Ralph Rickenbach
Published on 2010-03-24T06:47:32Z Indexed on 2010/03/24 6:53 UTC
Read the original article Hit count: 247

Filed under:
|

Having a popup menu attached to several components on a form (buttons, but also things like TCharts), I would like to know which component was right clicked to start the popup menu in the first place.

The Sender parameter of the click method just points to the TMenuItem, its parent to the popup menu (or the parenting menu item).

How do I get the originating component?

© Stack Overflow or respective owner

Related posts about delphi

Related posts about contextmenu