Page 1 of 1

Assign a back image by code

Posted: Thu Jul 21, 2016 7:25 am
by 16578522
Hello,

I am facing a strange issue with back image and TeeCreateMetafile so first I would like to ask if my code for assigning a back image is correct:

Code: Select all

  aBit := TPngImage.Create;
  try
    aBit.LoadFromResourceName(HInstance, 'PngImage_2');
    MyChart.BackImage.Assign(aBit);
  finally
    aBit.Free;
  end;
Do I need to call anything else? FYI the chart displays correctly on the screen but when the TeeCreateMetafile is called it looks like the plot is drawn twice!

Re: Assign a back image by code

Posted: Fri Jul 22, 2016 6:56 am
by 16578522
Here is a sample project .... First click on the assign back image button and then the create metafile

Re: Assign a back image by code

Posted: Fri Jul 22, 2016 10:42 am
by yeray
Hello,

I could reproduce the problem so I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1586

Feel free to add your mail to the CC list to be automatically notified when an update arrives.