Problem with TreeView control

  • Thread starter Thread starter Mevar
  • Start date Start date
M

Mevar

Hello to everybody.I have a trouble with the TreeView
control.I want to display a MenuContext when I click with
the right button on a TreeNode of the TreeView.The
problem is that if I click on a TreeNode everything
workfine but if I click in the background color of the
TreeView it display again myContextMenu.I've read
documentation about it.It says to handle the ButtonDown
click of the TReeView and then to test the button
pressed.After use the method GetNodeAt(x,y) of the
TreeView control.The problem is that if I don't click
over a node,GetNodeAt don't return (like I and
documentation aspect) the value null but an undefined
value,so I can't test it.Anyone knows what's wrong?Anyone
w to make selection of a tree node with only a right
click?Sorry for my English,Thank you to everybody.
 
Hi,

The GetNodeAt method does return null (Nothing in VB .NET) when passed
coordinates are somewhere in the background. This test works absolutely fine
for me. Which difficulties do you experience?
 
Back
Top