Results 1 to 2 of 2

Thread: Pixel position of a treenode

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2001
    Location
    Fishburn
    Posts
    45

    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.

  2. #2

    Thread Starter
    Member
    Join Date
    Sep 2001
    Location
    Fishburn
    Posts
    45

    ** 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width