数据结构如下:
create table [tbtree] (
[id] [varchar] (4) collate not null ,
[context] [nvarchar] (50) null ,
[parentid] [varchar] (4) null ,
constraint [pk_tbtree] primary key clustered
(
[id]
) on [primary]
) on [primary]
代码如下:
lprocedure tform1.readtree(tnode:ttreenode;fvalue: string);
lvar
l i: integer;
l flist:tstringlist;
l flist1:tstringlist;
l str:string;
本文关键:Delphi动态创建树