Home All Groups Group Topic Archive Search About

many listviews, one common context menu strip

Author
25 May 2009 1:13 PM
Dean Slindee
VS2008: I have one context menu strip connected to several listviews.  In
the code in the context menu_Click , I would like to know which of several
listviews was used to invoke the context menu item.  Is this possible?

Thanks in advance
Dean Slindee

Author
26 May 2009 1:26 AM
Joe Cool
On Mon, 25 May 2009 08:13:09 -0500, "Dean Slindee"
<slin***@charter.net> wrote:

>VS2008: I have one context menu strip connected to several listviews.  In
>the code in the context menu_Click , I would like to know which of several
>listviews was used to invoke the context menu item.  Is this possible?

I've never tried this but doesn't the sender property tell you that?
Author
26 May 2009 1:47 AM
Armin Zingler
Dean Slindee wrote:
> VS2008: I have one context menu strip connected to several listviews.
> In the code in the context menu_Click , I would like to know which of
> several listviews was used to invoke the context menu item.  Is this
> possible?

See ContextMenuStrip's SourceControl property.


Armin