Click to See Complete Forum and Search --> : treeview....need help!!


Derek
February 23rd, 2000, 04:58 AM
Hi,
I have a treeview and a textbox so whatever is the selected item in the treeview is displayed in the textbox. But it skips a selected item ad shows the next one in the textbox. It shows every alternate selected item.How do i get rid of this.
My next problem is that i cannot assign an image to the treeview nodes even after choosing an image list and mentioning the tag/key in the treeview code.........

Dim oNode as node
Set oNode=treeview1.nodes.add(, , "Name","Something","ImgName",TagName)

Is this right? And if it is wrong then can someone please tell me how to assign an image to the treeview nodes. Thanks in advance,
Derek

TH1
February 23rd, 2000, 05:05 AM
For the part about images instead of using the imgname
Dim oNode as node
set oNode=treeview1.nodes.add(, , "Name","Something","ImgName",TagName)



use the number of the image ie.

Dim oNode as node
set oNode=treeview1.nodes.add(, , "Name","Something",1,TagName)



Hope this helps
Tony.

Derek
February 23rd, 2000, 05:10 AM
Hi,
When i use this i get an error saying that the imagelist must be initialised.
Derek

TH1
February 23rd, 2000, 06:19 AM
There is an imagelist property for the treeview control. Set this it be whatever iamgelist you want.

Derek
February 24th, 2000, 01:30 AM
Thanks alot TH1 for the help. It worked
Derek