I want to add the imagelist control to the treeview control(ocx) but I keep getting a message that I have to initialize the imagelist control first. How is this done
The treeview works fine. Both ocx controls are dropped on the form but I have been consistently getting the error.
Appreciate the help.

Imagelist control
The Fish
>What is the website
Dave's site is at:
http://www.geocities.com/df_foxpro/
Andrew Buyan
Yes, I have the code in the form init. When I ran the form with your exact syntax, I got otree not found (my tree control was named tree and the imagelist object is named imagelist. But, in either case, whether I use otree or just tree, I get the same exception code. Makes me think I have an imagelist.ocx that is incorrect or some such. I'll work my way through this and thanks for your help.
John
barkingdog
David,
Thanks for your reply. What is the web site.
John
dreameR.78
Thank you very much for your answer. I placed this code into the init and I now receive:
ole idispatch exception code 0 from treectrl: invalid object
The bad part about this is that I have a functioning example of this tree control/ imagelist relationship in Fox 5.0 but when I try to recreate this in 9.0 for a different purpose, I continue to get this message. I appreciate any suggestions.
Chatanya
Alex,
Thanks for website. The example was good enough to get me finally working. I've already sent David a note but wanted to thank you too for sending me in the right direction.
JohnL
danych
In the Init() of the form:
This
.oTree.ImageList = This.oImageList.ObjectSachin Samuel
John,
Sorry about how unobvious the personal site links are in this forum. If you click someone's name on the left side it'll take you to their info page and websites are listed there... and frustratingly enough they aren't clickable links and when you try to set it up as an a href it admonishes you for attempting to enter a cross-site scripting attack. *g* Anyway I'm glad Alex pointed you in the right direction before I got back here.
Kevin Dente
The image list and the treeview live in the same ocx.
lgrainger
&& BUG: Set ImageList Property of Treeview Visually - MSKB Q163803
THIS.oTree.Object.Imagelist = THIS.oImageList.Object
Giulio
GrayMatter Software
Socal5vee
Did you put the code in the form's init
This exact same code works fine for me, so it is difficult to guess what the problem might be in your form.
Sorry.
Sres
David,
Just wanted to thank you for the excellent example of the treeview/imagelist relationship.
I finally got mine working and I'll be able to run with it for a while.
Thanks again.
JohnL