TreeView control - determine which TreeNode was selected w/MouseDo

TreeView control - determine which TreeNode was selected w/MouseDo

Post by TW9iaWxlTW » Sun, 02 Apr 2006 07:35:02


Does anyone have a good way to determine which Node is selected, using Mouse
functionality (versus using the TreeView_AfterSelected method)?? I've scene
the documentation that states there should be a TreeView.GetNodeAt(Point)
method which would allow you to trap the X & Y coordinates of your mouse via
the MouseDown() event handler, then create a Point object from those
coordinates, then use the GetNodeAt() method to determine if any node falls
under that point .... problem is this doesn't seem to be an available method
for CF v2.0 apps.

What I'm attempting to do is have a context menu dispaly, with relavent
choices, but only if the user is directly over an actual node. My problem is
the TreeView control allows the context menu to display even though the user
is in an empty area of the TreeView object .... no Nodes directly under the
stylus. I only want the context menu to display when the user is directly
over an actual Node.

Thanks
--
Stay Mobile
 
 
 

TreeView control - determine which TreeNode was selected w/MouseDo

Post by Daniel Mot » Sat, 08 Apr 2006 19:36:05

What you want is NodeMouseClick (vote for it)
http://www.yqcomputer.com/

For the workaround see this:
http://www.yqcomputer.com/

Cheers
Daniel