Which item did I right-click in a multiselect listview

G

Guest

I have a multiselect listview with an associated context menu. If the user
selects several items in the list and then right-clicks one of them is it
possible to tell in the handler which item was right-clicked?
 
G

Guest

try this in MouseUp or MouseDown events

if( e.Button == MouseButtons.Right )
{
listView1.GetItemAt( e.X, e.Y ).Text )
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top