Z
zhk7324385
Unregistered / Unconfirmed
GUEST, unregistred user!
如mainmenu中是 aa bb cc dda1 b1 c1a2 b2-a3treeview中应该为-aa a1 a2 - a3-bb b1 b2+ccdd 我是这么写的,但是结果不太对,所有的字节点都跑到aa下了结果treeview中成了:-aa a1 a2 - a3 b1 b2 c1bbccdd 那位高手给看看怎么这么改改var node:ttreenode; s:string; i,m:integer;begin TreeView1.Items.Clear; //加入权限列表 i:=0 ; while i<=mm1.Items.Count-1 do begin treeview1.items.Add(nil,mm1.items.Caption); //node:=treeview1.Items.Item; node:=treeview1.Items.GetFirstNode; // node:=treeview1. m:=0 ; while m<=mm1.Items.Items.Count-1 do begin if (Form1.mm1.Items.Items.Items[m].Caption<>'-') and (Form1.mm1.Items.Items.Items[m].Visible ) then TreeView1.Items.AddChild(node,mm1.items.Items[m].Caption); m:=m+1 end; i:=i+1;end;