|
-
Oct 31st, 2000, 05:00 PM
#1
Thread Starter
Frenzied Member
I'm trying to populate a treeview with the following method but it doesn't show the child node.. It shows the line going to where the child should be but no text appears.. What the heck am I doing wrong?
Code:
'-- initialize treeview
TreeView1.Nodes.Add , , "Test", "Test"
TreeView1.Nodes.Add "Test", tvwChild, "Test Child"
Any help would be appreciated..
Dan
-
Oct 31st, 2000, 06:19 PM
#2
Hi,
You are not seeing any text because didnt ask it to show any text. for the second node you forgot to specify any text.
Here is the modified code
Code:
Private Sub Form_Load()
With TreeView1
.Style = tvwTreelinesPlusMinusText
.Nodes.Add , , "TheKey", "The Text"
.Nodes.Add "TheKey", tvwChild, "TheKey2", "More Text"
For i = 1 To .Nodes.Count 'expand the whole tree
.Nodes(i).Selected = True
Next
End With
End Sub
Hope this helps
Danial
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|