Pixel position of a treenode
Does anyone have any idea on how to extract the position of a Treenode relative to the treeview in which its placed.
The reason I'm looking for this, is to try and solve Thread 253570
The way I'm thinking of doing this is by dynamically changing the image beside each treenode.
So I want to get the mouse position when the treeview is clicked (via the TreeView.MouseUp event) - this I can do.
But I need to check against the position of the node to see if the mouse was clicked over the image part of the node. If it was, then I'll toggle the image that's shown there.
If anyone has any ideas, I'd be very grateful.
Thanks.
** Resolved ** - Pixel position of a treenode
Found it....
Dim a As Rectangle = TreeView1.Nodes(0).Bounds()
If the specific node is not visible, then the rectangle origin is returned as 0,0