Last active
March 10, 2019 12:18
-
-
Save ezhov-da/2a6dcc7d3511ee007d0332338f984bc7 to your computer and use it in GitHub Desktop.
vba рекурсивный просмотр дерева.vba
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'просматриваем рекурсивно дерево и отменяем выделение узлов | |
Private Sub TraverseTreeDroppingFilter(ByVal objNode As Node) 'входной параметр узел | |
Dim objSiblingNode As Node | |
Set objSiblingNode = objNode | |
Do | |
objSiblingNode.Checked = False | |
If objSiblingNode.Key <> "0_id_root" Then objSiblingNode.Expanded = False | |
If Not objSiblingNode.Child Is Nothing Then 'если есть дети, тогда получаем первого ребенка | |
Call TraverseTreeDroppingFilter(objSiblingNode.Child) | |
End If | |
Set objSiblingNode = objSiblingNode.Next 'перемещение по уровню | |
Loop While Not objSiblingNode Is Nothing | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment