I have a Delphi application which displays an image using a TImage.
The location of the image is stored in a database and retrieved on load and set directly using co
You can store the filename in the Hint
property of Image1.
if you don't already use it. As intended or for another purpouse... I find this property pretty promiscuous :)
You can store the filename in the TagString property of Image1.
if you don't already use it.
(in Firemonkey, not VCL)
No, there isn't. You can store it yourself, though.
var ImageFileName: string; begin ImageFileName := Query1.FieldByName('image').AsString; Image1.Picture.LoadFromFile(ImageFileName); end;
Declare the ImageFileName variable at a place where it will be visible everywhere you need access to the file name.