SleepingGiant
Programmer
I'm trying to create an image viewer that will display thumbnails that can change when called for by user input on a form. I have an edit field on the form called ID# for input from the user to key in a 6 digit number which corresponds to a named .jpg file in the alias IMAGE directory, (EG: 602001 = 602001.jpg, 602002 = 602002.jpg). If the image file called for is not there, it will display a static image showing Image Not Available. I'm having trouble with the ~(tilde) function creating a call for the named image file desired. If I hard code the correct 6 digit name with the file extension after, it works. If I alter it to a file name that does not exist, the static image displays correctly. I'm using Paradox v 10.0.0.719 and here is the code I have:
method pushButton(var eventInfo Event)
var
prodImg,INAImg Graphic
ID String
endVar
ID=ID#
if prodImg.readFromFile(":IMAGE:~ID.jpg" then
ImgArea = prodImg
else
INAImg.readFromFile(":IMAGE:INA.bmp"
ImgArea = INAImg
endIf
endMethod
Any assistance would be greatly appreciated. TIA
Walt
method pushButton(var eventInfo Event)
var
prodImg,INAImg Graphic
ID String
endVar
ID=ID#
if prodImg.readFromFile(":IMAGE:~ID.jpg" then
ImgArea = prodImg
else
INAImg.readFromFile(":IMAGE:INA.bmp"
ImgArea = INAImg
endIf
endMethod
Any assistance would be greatly appreciated. TIA
Walt