Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to optimize use of the treeview-control in VFP?
Message
De
29/01/1999 18:49:12
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
29/01/1999 06:03:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00181709
Message ID:
00182075
Vues:
16
>I'm currently doing a project involving using two treeview
>controls to make a structure.
>The structure can consist of several thousands nodes.
>- What's the best way to recursively add the nodes in the tree?
> All the data for the nodes in the right three are gathered on
> startup and loaded into a VFP cursor. I've found that
> SCAN
> ...
> ENDSCAN
> doesn't work very well with recursive functions.

It works, but you have to save the Recno() before recursing, and GO back to it after that, so your Scan-EndScan loop continues from the same record. I do it often, and it works nice ever since 2.0.

> The max number of levels in the tree will be about 5-6.
> Is it better to make the addnodes-function non-recursive for
> speed-improvements?

I've built a treeview from a table (using exactly the recursion with scan-endscan), but haven't benchmarked it, and never had more than 50 nodes, so I can't know the speed issues.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform