procedure TfrmPermDesigner.AllOverTreeView(ATreeNode: TTreeNode);<br>begin<br> while ATreeNode <> nil do<br> begin<br> //在此插入遍历处理代码.<br><br> if ATreeNode.HasChildren then<br> begin<br> ATreeNode := ATreeNode.getFirstChild;<br><br> AllOverTreeView(ATreeNode);<br><br> ATreeNode := ATreeNode.Parent;<br> end;<br><br> if ATreeNode.getNextSibling <> nil then<br> ATreeNode := ATreeNode.getNextSibling<br> else<br> Exit;<br> end;<br>end;