Home General

TppImage

edited August 2001 in General
I have a TppImage on a report. At OnPrint I load a file from the disk. If
the file is not found I do not want to print any image. I check for the
existance of the file with FileExist if true then I load it from disk if
false I want to clear the image. I used TppImage.Clear. I do not get any
error messages and the line of code runs but the image is not cleared. Is
this a problem? Is there another way to accomplish clearing the image
either before it is loaded from the disk or after it is printed?

Thanks

Ray Long

Comments

  • edited August 2001

    One easy way to do this would be to set TppImage.Visible to True/False.

    TppImage basically works like Delphi's TImage. It has Picture property
    etc.

    I researched this and can find no way to clear the image other than to
    draw on the Picture.Bitmap.Canvas or resize it to 1 x 1 pixel (or both).

    BTW, the clear method is defined in an ancestor, but for Image is
    currently does nothing.



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.