Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting PictureVal property updates all objects of same
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
MySQL
Divers
Thread ID:
01319557
Message ID:
01319732
Vues:
19
>>There is a strange behavior when I set the pictureval property of an object.
>>
>>All image objects on the same form that are based on the same image class display the same picture after setting the pictureval of one of them, although they are not related to each other (except that they are from the same class).
>>
>>When I set instead the picture property to a file, then only the one object is updated with that picture.
>>
>>Is this a known issue, or is there a workaround for this? I would prefer the pictureval property because then I can delete the underlying image file and do not need to worry about deleting the file later.
>
>What happens if you use CLEAR RESOURCES just before you set PictureVal?

I think I realize now what happened:

All image object that were affected had the Picture property set to the same picture file. Updating the PictureVal property updates the image then on all the images where the picture resource is set to the same file.

So the solution is:

loImage.Picture = ""
loImage.PictureVal = lcPicVal
Christian Isberner
Software Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform