G
Guest
I overrided a TreeView control and then overrided it's MouseClick event like
so:
protected override void OnMouseClick(MouseEventArgs e)
{
// base.OnMouseClick(e);
TreeNode node = this.GetNodeAt(e.Location);
this.SelectedNode = node;
if (e.Button == MouseButtons.Right)
{
Console.WriteLine("show menu");
blockMenu.Show(this, e.Location);
}
}
when I right click I see the text "show menu" in my console but the menu
never shows up - why?
so:
protected override void OnMouseClick(MouseEventArgs e)
{
// base.OnMouseClick(e);
TreeNode node = this.GetNodeAt(e.Location);
this.SelectedNode = node;
if (e.Button == MouseButtons.Right)
{
Console.WriteLine("show menu");
blockMenu.Show(this, e.Location);
}
}
when I right click I see the text "show menu" in my console but the menu
never shows up - why?