views:

173

answers:

1

Basically the TreeView has checkboxes, and I am able to get the TreeNode, but it gives me the TreeNode wherever I click on the TreeNode, from it's text to it's checkbox and a little beyond that (to the left).

Can I restrict the hittest so I only get a TreeNode if the user click on the checkbox of the TreeNode?

+2  A: 
Jens Granlund
It's hard to explain but I am looking for a way to check/uncheck tree nodes if you click and drag over a treenode checkbox. So if you click over a tree node and drag over several checkboxes, it would toggle them all as you go over them while your left mouse button is down. I got it all working except once you start dragging, the dragging can also go outside the checkbox square, and still toggles the treenodes.
Joan Venge
TreeViewHitTestLocations.StateImage was what I was looking for.
Joan Venge