|
-
Oct 12th, 2000, 06:56 AM
#1
Thread Starter
Lively Member
Could anyone pass on any advice or experience on the best and fastest methods of populating a treeview control?
I don't want to read in the entire tree data initially and populate the entire tree, however I would prefer to populate it only as a node is expanded.
On top of that the most important things is that even though a node hasn't been expanded yet I want to have the "plus" sign show that there are children.
I have been doing this up to know by changing an icon that I use against each node, however I want to set the "plus" symbol in the treeview lines.
-
Oct 12th, 2000, 07:28 AM
#2
It all depends on where the data for the treeview is coming from. Otherwise, it's jsut a striaght Nodes.Add approach.
Ideally, you need the data in a hierarchical format to make life easy, and ideally the hierarcy needs to haveth ability to loop trhoug hchild nodes and through nodes on the same level.
to add a plus sign, you need to create a dummy node, then on the clikc event of the item, remove the dummy node and add the data required as the children.
That will effectively give you staged loading which is heaps faster than loading the whole data set at once
- gaffa
-
Oct 12th, 2000, 10:00 AM
#3
Thread Starter
Lively Member
Hey, thats it!!! Exactly what I was looking for...and it worked!!
Thanks 
Any chance you know how to modify the vertical spacing between nodes? I can't seem to find a property to allow this.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|