Re: Treeview help




<Fern G> wrote in message news:%23wewxjMCGHA.2644@xxxxxxxxxxxxxxxxxxxxxxx
> Can someone help me, I need to create a tree view from
> a file path ( like the folder view of Explorer )
> I have all the path components in a string array
> s() which is obtained using 'split(path,"\")'
>
> I tried this
>
> While i < UBound(s1)
> Set mynodes = mynod.Children
> Set mynod = mynodes.Add(, , s(i), s(i))
> i = i + 1
> Wend
>
> but I think the children property does not actually return a nodes of a
> node.


No, it doesn't. If returns the number of children the node has.

You set a node's relationship with another node when you add the node. This
is done by specifying values for the first 2 arguments of the Add method.

Spend some time reading VB's Help. It explains everything you need to know
to do this.

--
Mike
Microsoft MVP Visual Basic





.



Relevant Pages

  • Re: renaming file
    ... Once you get the correct file path from that dialog, ... You can also use Windows Find or Search ... > You are confusing Internet Explorer and Windows Explorer. ... > When you have it running, select its Tools> Folder Options> View ...
    (microsoft.public.word.newusers)
  • Re: Attach template via email?
    ... It shows me the file path, ... appear when I try to use Explorer to look. ... > Doug Robbins - Word MVP ... >> can't find the template folder or file. ...
    (microsoft.public.word.newusers)
  • Treeview help
    ... a file path (like the folder view of Explorer) ... Set mynodes = mynod.Children ...
    (microsoft.public.vb.general.discussion)
  • Re: background sound
    ... Any Wav or any Midi I choose will ... > complete file path will result in a "file not found" message and asking if ... Other sound ... Click on Outlook Express at the top of the folder tree so no ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: mdbdata full
    ... Open exchange system manager. ... Make note of the log file path and system files path. ... Then get all the properties of the databases in the storage group. ... > The mdbdata folder on the D:\ drive is full of Exxxxxx.txt ...
    (microsoft.public.exchange2000.general)