IDbTree Наследование  Функции и процедуры



Интерфейс дерева классификаторов

См. также: ITModule .DbTree, ISimpleTModule .DbTree


Пример на VB:
Dim TCS As CSDN.TCS
Dim App As CSDN.Tcs_Application
Dim Rw As Integer
Sub Test()
    Call Login
    
    Dim rNodes As CSDN.RootDbNodes
    Set rNodes = App.Parameters.DbTree.RootNodes
    
    Rw = 1
    For I = 1 To rNodes.Count
        Cells(Rw, 1).Value = rNodes.Item(I - 1).Text
        Call GetNode(rNodes.Item(I - 1), 1)
        Rw = Rw + 1
    Next
    
End Sub
Sub GetNode(Node As DbNode, Cl As Integer)
    For I = 1 To Node.Count
        Rw = Rw + 1
        Cells(Rw, Cl + 1).Value = Node.Item(I - 1).Text
        Call GetNode(Node.Item(I - 1), Cl + 1)
    Next
End Sub
Sub Login()
    
    If TCS Is Nothing Then Set TCS = CreateObject("CSDN.TCS")
    
    If App Is Nothing Then Set App = TCS.Login 
    
End Sub