Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Avoiding treeview to refresh
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00051562
Message ID:
00052179
Views:
40
>>>When I build my treeview, is there a way to have the refresh?
>>Probably the only way to refresh it - to clear nodes and refill it again - if it is that what you mean.
>
>Nick,
>
>You seem to have done a lot with the treeview. Is there any limit on the number of nodes one can load into it? Maybe not a physical limit, but some point where the treeview begins to really bog down in performance? Just wondering.
>
>Steve

Hello Steve,

You are right, "reasonable" limit happens quite before physical limit (actually I never reached any physical limit). :)
I would say that over 1000 node to open may have unacceptable execution time, if you do also something else except just adding a node.

In my case it was from 5 to 10 lines of code to setup the node (like conditionally setup node picture, select right-click menu for each particular type of node, setup node as parent using a dummy node) in addition to just Nodes.Add(...)
The best solution here is to define the treeview structure the way it loads minimum nodes at each level. For MS treeview
I used the technique with setting up the node as parent (adding 1 dummy node into it) then remove dummy and add actual nodes on Expand(). (If you use ctTree TreeView control you can define node as parent without adding nodes to it.)

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform