Forum > LCL

How to make TImage.Picture.Bitmap.Width automatically follows TImage.Width?

(1/1)

Leledumbo:
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: ---with AImage.Picture.Bitmap do begin
  Width := AImage.Width;
  Height := AImage.Height;
end;

--- End code ---
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.

Navigation

[0] Message Index

Go to full version