Question ContextMenu - which control?

bro840

Member
Joined
Aug 15, 2012
Messages
10
Programming Experience
1-3
Hi everyone

I'm developing a program where i have 8 Labels.

In my code i created an ContextMenuStrip which i full fill with 16 items.

And then i associate all my Labels to the ContextMenuStrip.


Now is the complicated thing to me... I want to know which one of my label starts up the contextmenus.

It is possible?

Thank you very much!
 
When you read the documentation for the ContextMenuStrip class you must have overlooked the SourceControl property, described thusly:
Gets the last control that caused this ContextMenuStrip to be displayed.
 
Back
Top