Show a contextmenu when right-click on a selected node of a lisview.

Dear Experts,

I have set a contextmenu to a listview. But as you can see in the picture
I can right-click anywhere in the listview.

What I would like is to show the contextmenu only when a user right-clicks
on a selected node.

Who knows the answer?

Peter

Peter
Example.jpg
LVL 1
peterkiersAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jagrut_patelConnect With a Mentor Commented:
See this link.
0
 
peterkiersAuthor Commented:
I do not get further than this:

        private void lvNotes_MouseUp(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {


            }
        }

P.
0
All Courses

From novice to tech pro — start learning today.