Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with displaying different images in a grid
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Problem with displaying different images in a grid
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01533651
Message ID:
01533651
Vues:
265
Hi everybody,

I made a container based class with the textbox and an image. I want to use this container in a grid. Assuming I have the following structure:

create cursor csrPrefs (LanguageCol C(50), Language C(50), Image Blob), how can I show this info correctly and correctly save info in each record?

Here is how it looks right now (see attached).

Here is what I have in my container class ImageField assign method:
lparameters tImageField
This.ImageField = tImageField
this.imgFlag.PictureVal = EVALUATE(m.tImageField)
and I assign the image field in the Init of the form.

In the button to open the image I have this code:
LOCAL lcFile, lcPicVal

lcFile = GETFILE("jpg;bmp;gif;png",'Select Language Flag Image','Select',0,'Select Image')

IF NOT EMPTY(m.lcFile)
   lcPicVal = CAST(FILETOSTR(m.lcFile) as Blob)
   this.Parent.imgFlag.PictureVal = m.lcPicVal
   replace (this.parent.ImageField) WITH m.lcPicVal  
   thisform.IsChanged = .t. 
ENDIF
Do you see how can I make it to work so each record in the grid will display its own image?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform