private void treeView1_MouseUp(object sender,
System.Windows.Forms.MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
this.treeView1.SelectedNode = this.treeView1.GetNodeAt(e.X ,e.Y );
this.contextMenu1.Show(this.treeView1,new Point(e.X,e.Y));
}
}
feudalac! - 09 Jun 2006 07:00 GMT
FUnky izlupa:
> private void treeView1_MouseUp(object sender,
> System.Windows.Forms.MouseEventArgs e)
[quoted text clipped - 12 lines]
>
> }
Since after creating a node i do tv1.node("name").contextmenu =
contextmenuname
i just used this
> this.treeView1.SelectedNode = this.treeView1.GetNodeAt(e.X ,e.Y );
it never occured to me to select it manualy
thanks
PIEBALD - 12 Jul 2006 19:45 GMT
> private void treeView1_MouseUp(object sender,
> System.Windows.Forms.MouseEventArgs e)
[quoted text clipped - 8 lines]
>
> this.contextMenu1.Show(this.treeView1,new Point(e.X,e.Y));
This line seems unnecessary, works without it.
> }