Page 1 of 1

Invisible TChart export bug

Posted: Thu May 11, 2006 11:12 am
by 9088042
Hello!

If I open a form with invisible TChart (for example TChart is on the second page of TabControl but first page is active) and try to export TChart (Chart.Export.Image.Metafile.Save("TeeChartMetaFile.emf") or Chart.Export.Image.Bitmap.Save("TeeChartBitmap.bmp")) pictures have wrong size, moreover, metafile is very small and empty.

But if I at first make TChart visible (by click on the second page of TabControl) export works correctly.

I use last TChart version (8 of May).

I send my simple application with this bug to Narcis Calvet e-mail.

What can I do?

Thanks,
Alex

Posted: Fri May 12, 2006 3:05 pm
by narcis
Hi Alex,

Thanks for the example. We could reproduce your problem here. It works fine using this code:

Code: Select all

        private void button4_Click(object sender, EventArgs e)
        {
          tChart1.Export.Image.Metafile.Width = tChart1.Width;
          tChart1.Export.Image.Metafile.Height = tChart1.Height; 
          tChart1.Export.Image.Metafile.Save("TeeChartMetaFile.emf");
        }

        private void button5_Click(object sender, EventArgs e)
        {
          tChart1.Export.Image.Bitmap.Width = tChart1.Width;
          tChart1.Export.Image.Bitmap.Height = tChart1.Height;
          tChart1.Export.Image.Bitmap.Save("TeeChartBitmap.bmp");
        }

Posted: Mon May 15, 2006 7:22 am
by 9088042
NarcĂ­s!

Now all is OK. Thank you!

Alex