>Salu2 James!!
>
>*:* I'm using the MereMortals framework which loads the imagelist and
>*:* treeview controls dynamically at runtime. So, just to eliminate that
>*:* layer I just created a form and dropped the two controls (imagelist and
>*:* treeview) on the forms and added that code to the treeview's Init
>*:* method. I got the same error.
>
>Sorry i don't use MMF...
>
>*:* However, when I right-clicked on the treeview control and defined the
>*:* imagelist in the treeview properties form that comes up and it worked.
>*:* So now I'm wondering what's the difference, and how do I get the same
>*:* effect through code?
>
>Try it :
>
>Change this code lines :
>
>IF TYPE('This.ImageList') == 'O'
> This.TreeView.Object.ImageList = This.Imagelist.Object
>ENDIF
>
> >By :
>
>IF TYPE('This.ImageList') == 'O'
> This.TreeView.Object.ImageList = This.Parent.Imagelist.Object
>ENDIF
>
>
>
>*:* Aloha,
>Salu2!
>
>
>*:* James
>Att.
Sorry that didn't work either. The code is actually in a container that gets loaded with the ImageList and Treeview objects at runtime. So This.Parent gets me a reference to the form that the container is on. That's in the MM Framework.
However, my little test using just a simple form, the imagelist control and the treeview control is still not rendering any success. I'm assigning the ImageList to the TreeView control in the TreeView.Init with the following code and it doesn't work:
This.Object.ImageList = ThisForm.oleImageList.Object
If I assign it in the TreeView properties it works fine. However, when using the MM Framework I can't do that because the TreeView and ImageList objects get loaded at runtime. I wonder what the difference is between assigning it with the line of code above and in the treeview properties?
Aloha,
James