Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ImageList with a ListView
Message
De
31/10/2001 15:39:02
Charles Richard
Nvo Management Systems
Boisbriand, Québec, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00575817
Message ID:
00575848
Vues:
24
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform