Lazarus

Programming => Packages and Libraries => LazReport => Topic started by: wcleyton on April 23, 2012, 07:17:05 pm

Title: LazReport - Picture component at run time.
Post by: wcleyton on April 23, 2012, 07:17:05 pm
Good afternoon,

 How do I create a component at run time Picture in LazReport?
Title: Re: LazReport - Picture component at run time.
Post by: wcleyton on April 24, 2012, 01:34:06 pm
Good Morning,

Good morning,

 Any suggestions? or it is not possible?
Title: Re: LazReport - Picture component at run time.
Post by: wcleyton on April 24, 2012, 03:29:39 pm
It worked!

Code: [Select]
procedure TForm1.Button1Click(Sender: TObject);
var
  Foto : TfrPictureView;
begin
  frReport1.Pages.Clear;
  frReport1.Pages.Add();
  Foto := TfrPictureView.Create;
  Foto.width  := 100;
  Foto.Height := 100;
  Foto.Left   := 10;
  Foto.Top    := 40;
  Foto.Stretched:=true;
  Foto.Picture.LoadFromFile('C:\Adesivos_Unhas\Imagens\P1000065.JPG');
  frReport1.Pages[0].Objects.Add(Foto);
  frReport1.ShowReport;
end;
TinyPortal © 2005-2018