PDA

Click to See Complete Forum and Search --> : Treeview Question -


lenin
Nov 25th, 1999, 05:34 PM
Hello,
I am trying to associate the nodes of a trreview with the returned recordset of a SQL query. However during the form load I get the following when tring to set the image property of the treeview control.

"Imagelaist must be set before it can be used"

Code Below
==========

With tvwDB
.Sorted = True
Set mnode = .Nodes.Add()
.LabelEdit = False
.LineStyle = tvwRootLines
End With

With mnode ' Add first node.
.Image = "closed"
.Text = "Publishers"
.Tag = "Biblio"

End With

However the example with biblio.mdb in VB examples is EXACTLY the same, and works without any problem.

Any help greatly appreciated.

Thanks

Tony.

Mark Sreeves
Nov 25th, 1999, 05:49 PM
Have you selected the Imagelist in the Treeview's property pages?

------------------
Mark Sreeves
Analyst Programmer

Mark.Sreeves@Softlab.co.uk
A BMW Group Company