G
Guest
the code below dows not let me get the parent child view... all the nodes are
show in one line only...
also i need them to be collasped ...
Thanks ..
Private Sub GetTree()
Dim objNode As TreeNode
Dim i, j As Integer
TreeView1.ImageList = ImageList1
'Create the Server Node
objNode = New TreeNode
objNode.Text = TextBox1.Text
TreeView1.Nodes.Add(objNode)
For Each objProject In objSession.Projects
objNode = TreeView1.Nodes.Add(objProject.Name)
'Loop thru Baselines
For Each objBaseline In objProject.Baselines
If objBaseline.Name <> "Deleted View" Then
objNode = TreeView1.Nodes.Add(objBaseline.Name)
If objBaseline.Name = "Default View" Then
objNode.Text = "Current Baseline"
Else
objNode.Text = objBaseline.Name
End If
For Each objReqType In objBaseline.RequirementTypes
Application.DoEvents() ' Allow for a break, so user
can cancel
objNode = TreeView1.Nodes.Add(objReqType.Name)
Next objReqType
End If
Next objBaseline
Next objProject
objNode = Nothing
Exit Sub
End Sub
show in one line only...
also i need them to be collasped ...
Thanks ..
Private Sub GetTree()
Dim objNode As TreeNode
Dim i, j As Integer
TreeView1.ImageList = ImageList1
'Create the Server Node
objNode = New TreeNode
objNode.Text = TextBox1.Text
TreeView1.Nodes.Add(objNode)
For Each objProject In objSession.Projects
objNode = TreeView1.Nodes.Add(objProject.Name)
'Loop thru Baselines
For Each objBaseline In objProject.Baselines
If objBaseline.Name <> "Deleted View" Then
objNode = TreeView1.Nodes.Add(objBaseline.Name)
If objBaseline.Name = "Default View" Then
objNode.Text = "Current Baseline"
Else
objNode.Text = objBaseline.Name
End If
For Each objReqType In objBaseline.RequirementTypes
Application.DoEvents() ' Allow for a break, so user
can cancel
objNode = TreeView1.Nodes.Add(objReqType.Name)
Next objReqType
End If
Next objBaseline
Next objProject
objNode = Nothing
Exit Sub
End Sub