Results 1 to 3 of 3

Thread: treeview loop

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    14

    treeview loop

    hey im having trouble with a treeview! >.<
    all i want to do is loop through the treeview, and when the nodes text is the same as a stored variable.. "drives" i need it to print all of the nodes children to a text file.
    for example:
    Dim i As Integer
    i = 66
    Dim endi As Integer
    endi = 90
    While (i <= endi)
    dim drives as string
    drives = chr(i) & ":\"

    treeview:
    +Root
    --+C:\
    -------+Cchild 1
    -------+Cchild 2
    --+D:\
    -------+Dchild 1
    -------+Dchild 2


    lets say chr(i) changed to C
    i want it to print in the text file:
    Cchild 1
    Cchild 2

    and nothing more.
    i know how to write the text file, but i dont have a clue on how to write these nodes.
    please help
    thanks

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: treeview loop

    This might help. It is a routine to print all of the treeview nodes, but you should be able to modify that from printing to writing to a text file.

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    14

    Re: treeview loop

    awesome! ill give that a go
    thanks

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