Subject |
Display Images on the form from a local imagefolder |
From |
AGOSTINHO <AGOSTINHOTEIXEIRA@YAHOO.COM> |
Date |
Fri, 22 Sep 2023 00:13:18 -0400 |
Newsgroups |
dbase.getting-started |
Following Mervin Bick adive that's not recommended to save images to tables.
>>>Mervin Bick advice:
>>>"hat said, just because dBASE allows you to do something doesn't mean
>>>you should. There is a school of thought that holds that one shouldn't
>>>save images in a table. One should rather keep all images in a folder
>>>and save the image name, including the path, to a text field in the
>>>table. One can use the rowset's onNavigate event handler to display the
>>>image in an image control on the form as the user steps through the table."
I've been trying to use images from my computer directory location but
can't get it to work.
I added a character field named "imagefolder" to my fish4.dbf file and wrote the image files name to this particular record "C:\Users\HOME_PC\Desktop\blueangelfish.png"
Dropped an image controle from the componed pallete to the form
and have programmed an onNavigate function into the form.
this.IMAGE1 = new IMAGE(this)
with (this.IMAGE1)
height = 4.84
left = 73.1111
top = 3.96
width = 17.8889
endwith
function form_onNavigate(nWorkArea)
local cImageFileName
// Assuming I have a field in my table that contains image file paths
cImageFileName = form.fish41.rowset.fields["imagefolder"]
// Image control's ImageFile property to display the image
this.image1 = cImageFileName
return
Thanks
Agostinho
|
|