Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting PictureVal property updates all objects of same
Message
From
27/05/2008 13:17:29
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
MySQL
Miscellaneous
Thread ID:
01319557
Message ID:
01319732
Views:
18
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform