Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview / Imagelist Won't Work
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00323926
Message ID:
00323927
Views:
25
>I have a Treeview on a form which works fine. I have placed an Imagelist on the same form. In the init event of the Imagelist I have placed the following code - This.Object.Listimages.Add(1,,LoadPicture("open.bmp")) - open.bmp exists in the path and this code executes fine.
>In the init event of the Treeview I have placed the following code - This.Object.Imagelist=Thisform.Imagelist1 (the name is correct I checked a dozen times) - here I get OLE (Dispatch exception code 0 from Treectrl Invalid Object
>Anybody have any ideas ?
>TIA
>John

John, it should be

this.Object.ImageList = this.parent.ImageList1.Object
and ImageList control has to be placed on the form before TreeView.

HTH,
Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform