Revert to design-time TImage picture

262 views Asked by At

How to revert to default design-time assigned picture of TImage component in Delphi XE+?

1

There are 1 answers

1
David Heffernan On BEST ANSWER

The control does not keep track of any previous images. So, you will need to do one of the following:

  1. Find a way to get hold of the image from the .dfm file when you need to revert.
  2. Make a note of the original image when the form is created, and restore that when you need to revert.

Option 1 is very messy, I do not recommend it. So, I suggest you go for option 2.