Hi There,
The code is as follows
private void Form1_Load(object sender, EventArgs e)
{
tChart1.Panel.MarginTop = 1;
tChart1.Panel.MarginBottom = 1;
tChart1.Panel.MarginUnits = Steema.TeeChart.PanelMarginUnits.Pixels;
tChart1.Panel.Transparent = false;
tChart1.Panel.Gradient.Visible = false;
tChart1.Walls.Back.Gradient.Visible = false;
tChart1.Walls.Back.Transparent = false;
tChart1.BackColor = Color.White;
tChart1.Panel.Color = Color.White;
tChart1.Walls.Back.Color = Color.White;
tChart1.Legend.Visible = false;
fastLine1.FillSampleValues(1000);
}
private void copyToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
Bitmap bm = tChart1.Bitmap;
System.Windows.Forms.Clipboard.SetImage(bm);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
The screen looks fine. When clipboard is pasted in paint you will see a black background.
I have uploaded the sample project too.
Regards
Srinivas
Black Panel in bitmap - TeeChart Version 3.2.2980.19083
-
- Newbie
- Posts: 41
- Joined: Wed Jan 30, 2008 12:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Srinivas,
Thanks for the example project. I've been able to reproduce the issue here and added it (TF02012937) to the bug list to be fixed.
Thanks for the example project. I've been able to reproduce the issue here and added it (TF02012937) to the bug list to be fixed.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Srinivas,
We have been reviewing the example project you sent. We found that at designtime you set (see InitializeComponent's implementation):
and
Since bitmap files don't support transparency, that's why you got images with a black background. To solve this issue, you can optionally comment out/remove those lines or use an image file format that supports transparency (GIF, PNF or TIFF).
There is another issue. Copying transparent PNG files to the clipboard means that they can only be pasted into Office2007 documents. Transparent PNG files cannot be pasted from the clipboard into a wide range of applications. You can use PNG.CopyToClipboard but only if you then do a "Paste Special" into an Office2007 document
However, transparent metafiles can also be pasted into any application, this works with your project:
We have been reviewing the example project you sent. We found that at designtime you set (see InitializeComponent's implementation):
Code: Select all
this.tChart1.BackColor = System.Drawing.Color.Transparent;
Code: Select all
this.tChart1.Panel.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
There is another issue. Copying transparent PNG files to the clipboard means that they can only be pasted into Office2007 documents. Transparent PNG files cannot be pasted from the clipboard into a wide range of applications. You can use PNG.CopyToClipboard but only if you then do a "Paste Special" into an Office2007 document
However, transparent metafiles can also be pasted into any application, this works with your project:
Code: Select all
tChart1.Export.Image.Metafile.CopyToClipboard();
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |