part of code when add the frist node:
...
With Me.TreeView1
'LockWindowUpdate .hwnd
M = 0
.LineStyle = tvwRootLines
Set Me.TreeView1.ImageList = Me.ImageList1
.Style = tvwTreelinesPlusMinusText
.nodes.Clear
Set NOD = Me.TreeView1.nodes.Add(Text:="ITALIA")
NOD.Image = 1
'AddChildren NOD, 0
'LockWindowUpdate 0&
'Debug.Print NOD.children
End With
....
part of code for other node:
'Me.TreeView1.ImageList = Me.ImageList1
Set CHL = Me.TreeView1.nodes.Add(Relative:=NOD, Relationship:=tvwChild, Text:=VALORE)
Select Case LEVEL
Case 0
CHL.Image = 2
Case 1
CHL.Image = 3
Case 2
CHL.Image = 4
End Select
...
attached the imagelist property and treeview with the first node
note:
the image of treeview contaian oly the first node, but the problem is exaclyy for all node! all node in treevieew dont have any icon!!!
...
With Me.TreeView1
'LockWindowUpdate .hwnd
M = 0
.LineStyle = tvwRootLines
Set Me.TreeView1.ImageList = Me.ImageList1
.Style = tvwTreelinesPlusMinusText
.nodes.Clear
Set NOD = Me.TreeView1.nodes.Add(Text:="ITALIA")
NOD.Image = 1
'AddChildren NOD, 0
'LockWindowUpdate 0&
'Debug.Print NOD.children
End With
....
part of code for other node:
'Me.TreeView1.ImageList = Me.ImageList1
Set CHL = Me.TreeView1.nodes.Add(Relative:=NOD, Relationship:=tvwChild, Text:=VALORE)
Select Case LEVEL
Case 0
CHL.Image = 2
Case 1
CHL.Image = 3
Case 2
CHL.Image = 4
End Select
...
attached the imagelist property and treeview with the first node
note:
the image of treeview contaian oly the first node, but the problem is exaclyy for all node! all node in treevieew dont have any icon!!!