Is it possible to show stored JPG files (in a general field) via an oleboundcontrol ??
Currently it automatically shows ICONS and BMP files but shows an icon indicating that it is a JPG file.
An simpler way to view .jpg files is to use an .image control on a form and in your SET PATH statement, (if you have one), include a folder containing the .jpg files.
A field in a table can then contain the relevant .jpg filenames.
Your option is the one I started with, but in my app I wish to show the images also in a grid, giving the users the ability to see an overview of the images. When using an olebound control and bmp's I can show them in a grid using a container with text boxes for info and an oleboundcontrol to show the images (just by setting the controlsource to the general field). This works fine when using bmp's.
But when using an image control in a grid and setting the path to the image (the path would then be stored in a table), this does not give a list with images but only the current image chosen.
In essence I would get a list that shows different data but the same picture in all rows.
Can I maybe use other VFP native controls to get this effect ??
You can use image controls in grid by way you started to use. However, you need to find a way to refresh image for each row of grid while grid draws it rows. You can do this by following way:
In dynamiccurrent* (any of them) property of column specify function call. In this UDF use column.Image.Picture = ... After calculating of all dynamiccurrent* expressions VFP paints row. Image will be already with another image, so will be painted correctly. This UDF will be called for each row displayed/refreshed.
Thanks for your comment. I experienced the refresh rate slowness as well in my earlier attempts with the image control. But I will give it a try and try to sort out the refresh problems.
I doubt you will get better refresh rate with OLEBound control. Its no matter who and when refresh image - anyway it displayed for each row, that cause delay in any case, just to display it. I agree that call of custom function in Dynamic* expression slows down grid refreshing a bit. However, probably you do not display a lof of rows for such grid, so above probably will not be a significant slow down.
If you want give your user a scaleable view of the thumbnails, try the following in a form with .BorderStyle = 3 and .Grid1.Left = 0 and .Grid1.Top = 0
Grid1.Column1 should contain the .Image control and Grid1.Column2 should contain TABLE.fieldname
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.