Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I assign an image's picture value from a table?
Message
De
21/11/2006 13:49:31
 
 
À
21/11/2006 11:07:12
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01171337
Message ID:
01171527
Vues:
7
>>>I'm using VFP 6.0. I have a table that stores a key and the location of the picture.
>>
>>You can add this code to the form's refresh
>>if !empty(yourtable.yourfield)
>>  image1.picture=youtable.yourfield
>>  image1.visible=.T.
>>else
>>  image1.visible=.F.
>>endif
>
>I've added a method called (surprised?) "refresh" to the image object itself, and guess what - it gets called on every refresh of the parent. So this code could as well go there, with "image." replaced with "this.".

Personally I usually use a timer to refresh the image, so that if my users navigates in a table, the image is not refreshed during the navigation, but about 0.25s after the navigation is stopped. This prevents flicker and reduces the network traffic. I have created a subclass for this purpose.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform