BackPicture loading with script at run time

Hi,

I want to load a BackPicture at runtime using script
with the following code

procedure Page1OnBeforePrint(Sender: TfrxComponent);
begin
Page1.BackPicture.LoadFromFile('C:\Delphi Devel BGC\Ressources 2007\meca625NLweb.jpg');
Picture1.LoadFromFile('C:\Delphi Devel BGC\Ressources 2007\meca625NLweb.jpg');
end;

It works well for Picture1 but not for Page1.BackPicture nothing is displayed.
when I set a breakpoint before and after the LoadFromFile, I got a valid width and Height ...

Do I miss something ?

Thanks for your help


Comments

  • gordkgordk St.Catherines On. Canada.
    edited 5:13AM
    is backpicturevisible set to true.
  • edited 5:13AM
    gordk wrote: »
    is backpicturevisible set to true.

    yes it is
    BackPicturePrintable is also True
    Those values were set via the Object inspector


  • gordkgordk St.Catherines On. Canada.
    edited 5:13AM
    do it in the empty "begin end." block of code that is the first script code to run.
  • edited 5:13AM
    gordk wrote: »
    do it in the empty "begin end." block of code that is the first script code to run.

    Hi 'gordk,

    THank you very much for your help. It is working now

    Dominique

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.