最简单的遍历树算法
procedure TForm1.Button1Click(Sender: TObject);
var
node: ttreenode;
i: integer;
begin
i := 0;
node := treeview1.Items.GetFirstNode;
while node <> nil do
begin
inc(i);
node := node.GetNext;
end;
caption := inttostr(i);
end;
本文来自博客园,作者:{咏南中间件},转载请注明原文链接:https://www.cnblogs.com/hnxxcxg/archive/2010/11/26/2940662.html