Results 1 to 7 of 7

Thread: TreeView and Node Keys

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    3

    TreeView and Node Keys

    I'd like to know if there is something like the unique keys for the nodes (VB6) in a treeview in VB.NET.
    I don't want to crawl thorugh the whole tree to find a node by its name (sometimes there can be more than one with the same name).

    Johnny

  2. #2
    Addicted Member
    Join Date
    Mar 2001
    Location
    Devon, UK
    Posts
    181
    Unfortunately there is not a unique key in vb.net you have to use fullpath. There is a article about adding additional information to the treenode which i'll try and find for you.
    Wind and waves resolves all problems.

  3. #3
    Addicted Member
    Join Date
    Mar 2001
    Location
    Devon, UK
    Posts
    181
    Forgot to say you can use the tag property to similar use
    Wind and waves resolves all problems.

  4. #4
    Addicted Member
    Join Date
    Mar 2001
    Location
    Devon, UK
    Posts
    181
    Wind and waves resolves all problems.

  5. #5

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    3
    thx for really fast help

  6. #6

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    3
    Another question...
    There are Collections...

    Dim F as Collection (for example)

    Here you can add Items with Keys.

    F.Add(...)

    I tried to use this with a TreeView, but the primary problem still not solved :-) how to identify the selected Node.
    In this case Microsoft changed the TreeView to a stupid not programmer friendly control.

    Johnny

  7. #7
    Addicted Member CoMMiE's Avatar
    Join Date
    Jul 2000
    Location
    Malaysia, Kuala Lumpur
    Posts
    179
    Hi
    You can use Treeview1.selectednode.text to get the selected items in treeview

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