-
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.
-
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.
-
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??