Results 1 to 4 of 4

Thread: Treeview Icon Not Displaying

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Location
    Atlanta, GA
    Posts
    80

    Question 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
    Kevin

  2. #2
    Fanatic Member RealisticGraphics's Avatar
    Join Date
    Jul 1999
    Location
    Arkansas
    Posts
    655
    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

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Location
    Atlanta, GA
    Posts
    80

    Talking

    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!
    Kevin

  4. #4
    Fanatic Member RealisticGraphics's Avatar
    Join Date
    Jul 1999
    Location
    Arkansas
    Posts
    655
    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
  •  



Click Here to Expand Forum to Full Width