Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ImageList with a ListView
Message
From
31/10/2001 15:39:02
Charles Richard
Nvo Management Systems
Boisbriand, Quebec, Canada
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00575817
Message ID:
00575848
Views:
25
To solve the same error for a treeview, I put this in imagelist.Init:
  This.object.listimages.add(1,,LoadPicture("C:\VFP6LIB\bitmaps\closed1.gif"))
  This.object.listimages.add(2,,LoadPicture("C:\VFP6LIB\bitmaps\open1.gif"))
I put the imagelist in a container, then (in my case) the treeview in the same container. Then I put the setting of the imagelist into the treeview object from the init of the container. This makes sure the loading of the images happens after the objects have finished initializing.

HTH
>>I have an ImageList and a ListView a form.
>>
>>In the Init of the form I have:
>>
>>
>>ThisForm.oleListView.ImageList = ThisForm.oleImages
>>

>>
>>and I still get the "ImageList must be initialized..." error.
>>
>>Anyone know why?
>
>Do you load any images into ImageList during its Init? If not, you can't associate it with another control. I put the following in my Treeview/ImageList container for this purpose:
>With THISFORM
>	if type(".OleIL.ListImages") = "O" ;
>		and !isnull(.OleIL.ListImages) ;
>		and .OleIL.ListImages.Count > 0 then
>		.OleTV.ImageList = .OleIL
>	endif
>Endwith
>
>HTH.
Charles Richard
NVO Management Systems
crichard@nvo.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform