Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i dont view any icon durin node add 1

Status
Not open for further replies.

2009luca

Programmer
Jul 27, 2013
221
0
16
IT
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!!!



 
After all of the posts and replies you have posted here on TT, it is about time for you to present your [tt]CODE[/tt] like this:

Code:
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

Don't you think [ponder]

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson
 
tKS strongm, resolved with a rem on:

.Style = tvwTreelinesPlusMinusText

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top