Assign a back image by code

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
johnnix
Newbie
Newbie
Posts: 16
Joined: Mon Jun 20, 2016 12:00 am

Assign a back image by code

Post by johnnix » Thu Jul 21, 2016 7:25 am

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!

johnnix
Newbie
Newbie
Posts: 16
Joined: Mon Jun 20, 2016 12:00 am

Re: Assign a back image by code

Post by johnnix » Fri Jul 22, 2016 6:56 am

Here is a sample project .... First click on the assign back image button and then the create metafile
Attachments
Sample Project.7z
(88.85 KiB) Downloaded 776 times

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Assign a back image by code

Post by Yeray » Fri Jul 22, 2016 10:42 am

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply