Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Mar 2005
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Invisible root in tree? (WinXP and down)

    Hi all!

    How do I make a treeview have an invisible root? I can manage a visible one like:

    ' Add root.
    Set SomeNode = trvProduct.nodes.Add(, tvwFirst, STR_THE_ROOT_OF_THE_TREE, "Product groups")
    SomeNode.Expanded = True

    ... children must now go in trvProduct having an invisible root?
    ???


    Regrads,
    Michael.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Invisible root in tree? (WinXP and down)

    I don't see a way in VB/VBA to make the root of a treeview invisible. What do you want to accomplish?

  3. #3
    Lounger
    Join Date
    Mar 2005
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Invisible root in tree? (WinXP and down)

    ...that all my children are visible and their common ancestor, the root, are not... It's a normal request for a tree to show like this.

    I *think* I've seen a solution for it(?) Just *think*

    Regards,
    Michael.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Invisible root in tree? (WinXP and down)

    It *is* possible - the TreeView control in Delphi, for example, has a ShowRoot property (True/False), but in VB/VBA you probably need SendMessage or some other Windows API call. I'm afraid I can't help you with that.

Posting Permissions

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