ADD icon on root treeview

User avatar
sal21
PlatinumLounger
Posts: 4339
Joined: 26 Apr 2010, 17:36

ADD icon on root treeview

Post by sal21 »

how to add a icon with index 1 from imagelist1?

here
Set NODMARE = .Nodes.Add(Key:=TIPO_STRUTT, Text:=TIPO_STRUTT)

and here
Set NODCHILD = .Nodes.Add(Key:=INDICE, Relative:=TIPO_STRUTT, Relationship:=tvwChild, Text:=INDICE)

User avatar
HansV
Administrator
Posts: 78381
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: ADD icon on root treeview

Post by HansV »

Set the Style property of the TreeView control to 7 - tvwTreelinesPlusMinusPictureText.

Set NODMARE = .Nodes.Add(Key:=TIPO_STRUTT, Text:=TIPO_STRUTT, Image:=1)

Set NODCHILD = .Nodes.Add(Key:=INDICE, Relative:=TIPO_STRUTT, Relationship:=tvwChild, Text:=INDICE, Image:=1)
Best wishes,
Hans