Link to home
Start Free TrialLog in
Avatar of Peter Kiers
Peter KiersFlag for Netherlands

asked on

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
Avatar of Peter Kiers
Peter Kiers
Flag of Netherlands image

ASKER

I do not get further than this:

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


            }
        }

P.
ASKER CERTIFIED SOLUTION
Avatar of jagrut_patel
jagrut_patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial