Recent

Author Topic: How to make TImage.Picture.Bitmap.Width automatically follows TImage.Width?  (Read 4814 times)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
I put a TImage to a form, whose WindowState set to wsMaximized. When the form is shown, some area of the TImage is black. I've put:
Code: [Select]
with AImage.Picture.Bitmap do begin
  Width := AImage.Width;
  Height := AImage.Height;
end;
in the TImage's OnResize event. But it doesn't seem to be called after the form is shown. Instead, before (tested with some ShowMessage's). That's why some of the area is black.

 

TinyPortal © 2005-2018