treeview image problem
Posted on 2003-02-21
No matter what I do it seems that each node will have the same image applied to it from my imagelist.
Thes keys I use to access pictures from the imagelist work as I can use this on my form background with no trouble, however when I use these keys to the imagelist on my node I am stuck with the same image for every node.
For Each obj1 In DencomGeo
.Nodes.Add , , obj1.GeoReigonName, obj1.GeoReigonName
.Nodes(obj1.GeoReigonName).Image = ImageList1.ListImages("geo").Picture
For Each obj2 In obj1.RDCcollection
.Nodes.Add obj1.GeoReigonName, tvwChild, obj2.rdcCode, obj2.RDCDescription
.Nodes(obj2.rdcCode).SelectedImage = ImageList1.ListImages("rdc").Picture
For Each obj3 In obj2.UICcollection
.Nodes.Add obj2.rdcCode, tvwChild, obj3.UIC, obj3.Description
For Each obj4 In obj3.clinicCollection
'We append the text 'DMISID' to our dmisid value so it can be
'accepted as a key. THis neccesitates that we remove that string
'from the key before we use the key as a sql parameter.
.Nodes.Add obj3.UIC, tvwChild, "DMISID" & obj4.clinicDMISD, obj4.clinicName