|
-
Jan 5th, 2002, 05:26 PM
#1
Thread Starter
Lively Member
Treeview Icon Not Displaying
I have a treeview that goes three levels Deep:
1) Parent (Group of Servers)
2) Child (Server Name)
3) Child of the Child (Property of the Server)
I have loaded an imagelist and am trying to display icons for each of the items in the corresponding level. The first two levels display their icons fine.
The 3rd level only displays the icon if the Node is currently selected --- see attached image.
Is there are a limitation on the treeview icons? Is this normal? I need to display the icons for all of the levels at the same time. They will evetually be used to display the current status for all of the servers and their "properties."
Thanks!!!!
Kevin
P.S. My first time working with a TreeView
-
Jan 5th, 2002, 05:54 PM
#2
Fanatic Member
My guess would be that in the nodes that are having the problem you have your image in the wrong spot. Something like this would be what you have currently I would guess:
Code:
With TreeView1
.Nodes.Add , , "TopLevel", "Production Servers", "i1"
.Nodes.Add "TopLevel", tvwChild, "ServerName", "Winserver", "i2"
.Nodes.Add "ServerName", tvwChild, "PingIt", "Server Ping", ,"i3"
End With
Where it has Server Ping right before i3, (which is the image name) I think you have an extra comma as shown above. Remove the extra comma and see if that fixes it. It should look like the code below. If this is not the problem let me see some of your source code and I bet I can track it down for you.
Code:
With TreeView1
.Nodes.Add , , "TopLevel", "Production Servers", "i1"
.Nodes.Add "TopLevel", tvwChild, "ServerName", "Winserver", "i2"
.Nodes.Add "ServerName", tvwChild, "PingIt", "Server Ping", "i3"
End With
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
-
Jan 5th, 2002, 08:15 PM
#3
Thread Starter
Lively Member
You are awesome! That is exactly what the problem was... I had an extra comma that got thrown in there somehow during my Do Loop thru the Recordset being displayed.
Works like a charm now.
Thanks for the quick reply!
-
Jan 5th, 2002, 09:49 PM
#4
Fanatic Member
No problem. Glad to help.
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
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
|