Hi guys.
I have a question.
How i could do to display a panel of options if the cursor click in a item of the listview ?
I know about the MouseEvent and how to select the right click event, but i lost to apply that click in a item.
Thanks

Recommended Answers

All 4 Replies

Thanks for your answer Kimpl.
I ve done that and now when clicking in the listview, the contextmenu shows.
But the problem is that i want to show that menu only if he clicks in a selected item.
How can i do that ?
Thanks

I could do it !!!

I have done this:

private void conectadosView_MouseDown(object sender, MouseEventArgs e)
        {           
          if ((e.Button == MouseButtons.Right) && (conectadosView.GetItemAt(e.X, e.Y)!= null)) //If it's the right button.
            {
              
                    contextMenuStrip1.Show(this.conectadosView, e.Location);
             
            }
        }

I'm happy I was able to help you solve your problem. :]

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.