表结构如下
FID   FName      FParentID
1     原材料     0
2     木头       1
3     铁头       1
4     成品       0
5     车         4
6     房         4
7     美女       4
............有n多数据
用TreeView加的时候,非常慢
我想用TMemoeryStream在生成树
请问要怎么实现????

解决方案 »

  1.   

    到2ccc.com下载有多线程建立树。
      

  2.   

    Before you constructing the tree, invoke Items.BeginUpdate
    after the tree is constructed, invoke Items.EndUpdateOr I suggest you use TVirtualTree to perform, that's neat!
      

  3.   

    在顶一下,用TreeView一定有办法的
      

  4.   

    如果你是要遍历数据库建树
    那用不用Stream都一样慢,还不如直接操作树方便
      

  5.   

    to
    li_chengbin(小李飞刀) 
    这个我用过了,还没有用TMemoeryStream的快
      

  6.   

    生成树前后调用  TreeView1.Items.BeginUpdate/TreeView1.Items.EndUpdate