Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TreeView - I can't get the ImageList property initialize
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00041539
Message ID:
00041761
Views:
39
>>>>>>I'm trying to associate an imagelist with the treeview list. I've both the treeview and the imagelist objects on a form together.
>>>>>>Efforts to try and set the treeview's imagelist property to the imagelist object have failed.
>>>>>>
>>>>>>THISFORM.treeview.imagelist = THISFORM.imagelist
>>>>>>
>>>>>>I get an "invalid object" error message.
>>>>>>
>>>>>>Thanks,
>>>>>>Steve Despres
>>>>>
>>>>>Have you also tried rightclicking over the Treeview to set the ImageList there?
>>>>
>>>>Steve, check your version of the comctl32.ocx. If it is not the same as on VFP CD-ROM in OS\SYSTEM directory, unregister old one, copy one from CD and register it again.
>>>>Getting "wrong" ocx version - that what happened to me after VB installation - latest comctl32.ocx don't work properly with VFP. In my case neither setting of ImageList property of the TreeView, nor setting it in code worked.
>>>>Now I have comctl32.ocx size 332288, date 08/21/96 - this one works for sure.
>>>>
>>>>Nick
>>>
>>>Hi Folks!
>>>
>>>Here is some code that will do the trick:
>>>
>>>oForm.oleTreeView.Object.ImageList = ThisForm.oleImages.Object
>>>
>>>I usually put this code in the init event of the form. Off course, this is not the perfect way to do it because it's against some OO rules, but it's the only way to make sure that all the objects are already initialized.
>>>
>>>Greetings
>>>Markus
>>
>>In my case even this code didn't work, and only reinstallation of "right" comctl32.ocx helped. BTW, the latest TreeView versions from MS don't show any
>>of specific TreeView properties in right click menu - just empty comboboxes... :)
>
>What's the error message you got?

"Invalid Object", when trying to setup it in code, as far as I remember. In TreeView Control properties the combobox for ImageList property was showing nothing. And after reinstallation comctl32.ocx from VFP CD-ROM everything was back to normal, both n code and in ImageList property.

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