Results 1 to 10 of 10

Thread: TreeView

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2008
    Posts
    3

    TreeView

    Hi,

    I'm using VB6 and the TreeView controls from "Microsoft Windows Common Controls.". Due to the bug http://support.microsoft.com/kb/182231 it is not possible to add more than 32767 nodes to the tree and have the TreeView function correctly.

    I want to add 100,000's items to the TreeView.

    Is there any work around from this problem?

    Is there any other implementation of TreeView that I can use with VB6 that does not suffer from this problem?

    I have found a reference that Virtual Tree from www.infralution.com allows more than 35K items, but this only works with .NET.

    Any help greatly appreciated,


    Thanks,

    Máirtín

  2. #2

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2008
    Posts
    3

    Re: TreeView

    Quote Originally Posted by MartinLiss
    No as far as I know there is no solution to this problem.
    Thanks for the reply, guess I'll have to drop using the TreeView.

    I've very basic knowledge of VB. Is it true that there is no other Tree control developed by some other person\company that overcomes this limit of 32767 nodes in a Tree?

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: TreeView

    That's a huge amount of nodes, it is far more than I (as a user) would want to see.

    I don't know what data you are showing (or how you are getting it), but one way to work around the limit is to just load the parent nodes to start with, then add/remove the child nodes as the parents are opened and closed (but keep one 'dummy' node inside each closed parent, so that the +/- still shows). This is the kind of method that Explorer uses, and it works nicely there.

  5. #5

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

    Re: TreeView

    Quote Originally Posted by si_the_geek
    That's a huge amount of nodes, it is far more than I (as a user) would want to see.

    I don't know what data you are showing (or how you are getting it), but one way to work around the limit is to just load the parent nodes to start with, then add/remove the child nodes as the parents are opened and closed (but keep one 'dummy' node inside each closed parent, so that the +/- still shows). This is the kind of method that Explorer uses, and it works nicely there.
    I expect however that it would be pretty slow in VB.

  7. #7

    Thread Starter
    New Member
    Join Date
    Nov 2008
    Posts
    3

    Re: TreeView

    Quote Originally Posted by MartinLiss
    I don't know but this might, although I doubt it. Why do you need so may nodes?
    Thanks, I'll check out that control.

    I need so many nodes because my VB application is reading data from a database and when I expand a node I want to display all the records.

  8. #8

  9. #9
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: TreeView

    Quote Originally Posted by MartinLiss
    I expect however that it would be pretty slow in VB.
    Not at all, it is quite easy to get a similar speed to Explorer if your source of data is equivalent.

    In a case like this it would probably make the program faster overall, as the initial loading of the control is so much simpler, but it would add time to expanding a node - and that could potentially be an issue depending on the amount of the data in each node and the complexity of the query to get it.


    Without knowing the data etc it is hard to know what the best methods might be, but one possibility is to use a combobox to hold the parent nodes, then just use the ListView to show the child data.

  10. #10
    Fanatic Member DrUnicode's Avatar
    Join Date
    Mar 2008
    Location
    Natal, Brazil
    Posts
    631

    Re: TreeView

    Try ucTreeView at http://www.planet-source-code.com/vb...57047&lngWId=1

    I loaded over 100000 nodes in appx 4 seconds with no problem.
    Last edited by DrUnicode; Nov 7th, 2008 at 07:23 PM.

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