Results 1 to 3 of 3

Thread: Get all TreeView Items[Resolved]

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Posts
    566

    Get all TreeView Items[Resolved]

    Is it possible to list all the items in a TreeView? Not the Count, but all the items in it.

    Also, How can you check if an item is already in the TreeView, and if it is then don't add it?

    Thanks in advance
    Last edited by emyztik; May 21st, 2006 at 10:49 PM.
    if you helped me, consider yourself thanked

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Getting all Items in Treeview &..

    VB Code:
    1. Dim lngIndex As Long
    2.  
    3. For lngIndex = 1 To MyTV.Nodes.Count
    4.     Debug.Print MyTV.Nodes(lngIndex).Text
    5. Next
    To check for and disallow duplicates, add a key to each node. Keys must be unique or a trappable error is raised.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Posts
    566

    Re: Getting all Items in Treeview &..

    Thanks, MartinLiss.
    if you helped me, consider yourself thanked

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