R raymond715 Unregistered / Unconfirmed GUEST, unregistred user! 2010-11-08 #1 遍历TreeView某节点下所有的子节点(要考虑存在多层次)最好给出源代码!
S smlabc Unregistered / Unconfirmed GUEST, unregistred user! 2010-11-08 #2 for i := 0 to tv1.Items.Count-1 do begin if Assigned(tv1.Items.Parent) and (tv1.Items.Parent = Node) then begin //Node是你的"某节点" end; end;
for i := 0 to tv1.Items.Count-1 do begin if Assigned(tv1.Items.Parent) and (tv1.Items.Parent = Node) then begin //Node是你的"某节点" end; end;
R raymond715 Unregistered / Unconfirmed GUEST, unregistred user! 2010-11-09 #3 以上答案只能遍历当前节点的下一级子节点,没有考虑到子节点的子节点,即多层的情况就遍历不到[]