CopyToClipBoard
CopyToClipBoard
Hi,
when using Chart.Export.Image.Bitmap.CopyToClipboard and pasting to 'Paint' application, the background is always Blue, although it is WhiteSmoke on the display.
Chart.BackColor = Color.WhiteSmoke;
To get it to be the correct color, I must set the Chart.Panel.Brush.Visible = true and set the brush up with the correct colors and some hashstyle.
Do the Copy, then set it back to false.
It is blue for bitmap or JPEG. I did not try others.
Why is this? is this fixed in the upcoming release? doesnt make sense.
thanks,
when using Chart.Export.Image.Bitmap.CopyToClipboard and pasting to 'Paint' application, the background is always Blue, although it is WhiteSmoke on the display.
Chart.BackColor = Color.WhiteSmoke;
To get it to be the correct color, I must set the Chart.Panel.Brush.Visible = true and set the brush up with the correct colors and some hashstyle.
Do the Copy, then set it back to false.
It is blue for bitmap or JPEG. I did not try others.
Why is this? is this fixed in the upcoming release? doesnt make sense.
thanks,
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi matthbri,
Copying to clipboard or exporting to JPEG and Bitmap works fine for me here using latest debug build available at the client area, a chart with default settings and this code:
We expect to have a new maintenance release ready in the upcoming days. Which TeeChart version are you using?
Copying to clipboard or exporting to JPEG and Bitmap works fine for me here using latest debug build available at the client area, a chart with default settings and this code:
Code: Select all
tChart1.BackColor = Color.WhiteSmoke;
tChart1.Export.Image.JPEG.Save(@"e:\temp\backcolor.jpg");
tChart1.Export.Image.Bitmap.Save(@"e:\temp\backcolor.bmp");
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 Brian,
If you want to be sure you can send us an example we can run "as-is" and I'll test it with the latest debug build and our current sources.
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
If you want to be sure you can send us an example we can run "as-is" and I'll test it with the latest debug build and our current sources.
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
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 Brian,
Thanks for the example. We could reproduce your problem here and found its cause. The problem is that you set the panel's brush no not visible:
Just commenting out this line will solve the issue. Also, if you don't want the spheric brush style also comment out the following line:
Thanks for the example. We could reproduce your problem here and found its cause. The problem is that you set the panel's brush no not visible:
Code: Select all
tChart1.Panel.Brush.Visible = false;
Code: Select all
tChart1.Panel.Brush.Style = System.Drawing.Drawing2D.HatchStyle.Sphere;
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 |
Hi,
Actually this suggestion is no good. If I enable the brush, the screen appearance has now changed. it has some kind of pattern on it, dependant on the brush style.
So before the export I make the brush visible, then after the export invisible. This does what I want, but it is a workaround in my opinion, not a fix.
For your info, the previous version of TeeChart did not have this problem.
It was introduced in build 2.0.2306.26232
Actually this suggestion is no good. If I enable the brush, the screen appearance has now changed. it has some kind of pattern on it, dependant on the brush style.
So before the export I make the brush visible, then after the export invisible. This does what I want, but it is a workaround in my opinion, not a fix.
For your info, the previous version of TeeChart did not have this problem.
It was introduced in build 2.0.2306.26232
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi matthbri,
As I said in my last post, This is because you set:
To avoid this pattern afecting the image please comment that line as well.
Setting the brush not visible is like making the chart transparent. You can find the explanation of this phenomena (copying an image to the clipboard adds blue background) here.
As I said in my last post, This is because you set:
Code: Select all
tChart1.Panel.Brush.Style = System.Drawing.Drawing2D.HatchStyle.Sphere;
Setting the brush not visible is like making the chart transparent. You can find the explanation of this phenomena (copying an image to the clipboard adds blue background) here.
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 matthbri,
You already made it solid using:
I commented out the brush style and got some kind of hashed appearance. The styles do not include a solid?
You already made it solid using:
Code: Select all
tChart1.Panel.Brush.Solid = true;
Have you read the message I pointed you to? Please read that whole thread for an explanation to this.I still dont see why the export image should be different to the screen image. Doesnt make sense.
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 |