Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Target for Delegate for TreeNode ContextMenuStrip Won't Fire

$
0
0

I have a contextmenustrip added to the nodes of a treeview.  The menu appears when I right-click a node, but the target method of my contextmenustrip does not fire when I click on the label in the menu.

private ContextMenuStrip clientDocMenu = new ContextMenuStrip();

public frmContacts()
{
    InitializeComponent();
    this.clientDocMenu.Click += new  EventHandler(this.clientDocMenu_Click);
...
}

private void clientDocMenu_Click(object sender, EventArgs e)
{
    MessageBox.Show("Do something for the client.");
}


REvans



Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>