In addition to what Jamie and Jordan advise, You could just populate the root nodes, and wait to add the children when the root is expanded
>Treeview is most suitable control for my task. But, since I need to fill it with over 15000 records it is very slow. If I decide to add nodes only for first level (3500 records) it is slow again. Code I use is
>
>sele xx
>scan
> thisform.oletree.add(...)
> ..
> ..
> sele yy
> scan for yy.field1 = xx.field2
> thisform.oletree.add(...)
> ..
> ..
> endscan
>endscan
>
>I tried to fill from one table, or to evaluate expression (stored in table) where is stored definition of adding node but always is slow. Maybe treview is not suitable control for bunch of records?
>
>Is there any resonable solution for my problem or is there some other control with similar behavior?
>
>Thanks in advance.
Imagination is more important than knowledge