Results 1 to 3 of 3

Thread: take a look on this code please!!!

  1. #1
    Guest

    Unhappy

    Can anybody tell me what's wrong with this code please!
    Dim imgX As ListImage
    Set imgX = ImageList1.ListImages. _
    Add(, "down", LoadPicture(App.path & "\arrowdown.jpg"))
    Set imgX = ImageList1.ListImages. _
    Add(, "right", LoadPicture(App.path & "\arrowright.jpg"))
    Set tvBG.ImageList = ImageList1
    Set nod1 = tvBG.Nodes.Add(, , "Root", "Títol llibre")
    Set nod1 = tvBG.Nodes.Add("Root",tvwChild, "Cap1", "Manejo")
    nod1.Image = "down"
    Set nod1 = tvBG.Nodes.Add("Root",tvwChild, "Cap2", "Manejo")

    I put the code but it doesn't appear the image arrowdown.jpg in the node Cap1.
    Thanks.

  2. #2
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657
    I ran your code and it worked OK for me. The only thing I can think of is, are your jpg files too large to display properly in the treeview? I initially tried this with a big jpg file, and the treeview display was wacky when I ran the code. I substituted ico files, and it worked fine.
    "It's cold gin time again ..."

    Check out my website here.

  3. #3
    Guest
    BruceG!
    I also tried my code in a simple application and it worked, the only reason that I found for this is that it doesn't work in the application where I'm using an image as background of the tree.......does it make any sense??

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