Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using treeview activeX
Message
De
20/05/1998 14:05:33
Ryan Hirschey
Federal Reserve Bank of New York
New York City, New York, États-Unis
 
 
À
20/05/1998 13:59:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00100616
Message ID:
00100620
Vues:
61
>I was trying to associate pictures to a treeview control but I haven't succeded in doing it.
>I tried to set the imagelist property of the control = an imagelist control but it gives me the error the the object is invalid.
>Please give me a help.
>Thank you
>Alessio


The following information can be found at www.classx.com:

If you've installed Visual Basic 5.0, Visual Studio 97, or other new Microsoft products, you may have a registered ComCtl.ocx in your Windows\System directory
that is dated after 8-21-96 (the VFP 5.0 version). If so, the behavior has changed. This common windows component has been updated, and for whatever reason, when the ImageList is hosted in a VFP form, the property page settings for the associated ImageList does not persist, meaning it doesn't get saved after you close the dialog. The solution is to associate the ImageList like the VB samples show. In the Init of the TreeView, add the code below:

this.object.ImageList=thisform.imagelist1.object && imagelist1=imagelist object

In a ListView:

this.object.Icons=thisform.imagelist2.object && imagelist2=imagelist object

this.object.SmallIcons=thisform.imagelist3.object && imagelist3=imagelist object

The following applies to using a registered ComCtl32.ocx dated after 8-21-96. If you have an SCX or VCX container (form, etc.) which contains a TreeView or
ListView control with an ImageList control, and was saved using a ComCtl32.ocx dated 8-21-96 (version that ships with VFP 5.0), then that VCX/SCX form will
run under any old or newest version of ComCtl32.ocx, so forward compatibility is fully retained, no problems there.

An important warning exists when using a ComCtl32.ocx registered after 8-21-96. If you create and/or save a form or class that uses a control within
ComCtl32.ocx, and your ComCtl32.ocx is dated after 8-21-96, then the same version of ComCtl32.ocx or later will be required to modify and/or run that
form or class. New versions of ComCtl32.ocx are forward compatible only, not backward compatible
Ryan Hirschey
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform