Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with displaying different images in a grid
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Problem with displaying different images in a grid
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01533651
Message ID:
01533651
Views:
263
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
Next
Reply
Map
View

Click here to load this message in the networking platform