Solved

Printing a TeeChart with visual component dropped on it !!!

Posted on 2001-07-05
10
271 Views
Last Modified: 2012-05-04
Hi, to print a TDBchart is pretty easy.
MyTeeChart.print.
What to do in the cases when on our MyTeeChart we have dropped e.g. one button & two labels ? The same command "MyTeeChart.print" print the chard bared from this components.
How can I make to print  MyTeeChart out as it looks (WYSIWYG) together with other components which I dropped on it ?
0
Comment
Question by:genc_ymeri
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
10 Comments
 
LVL 13

Expert Comment

by:Epsylon
ID: 6256894
You mean something like this?

uses Printers;

  Printer.BeginDoc;
  Printer.Canvas.CopyRect(Printer.Canvas.ClipRect, Form1.Canvas, Bounds(Chart1.Left, Chart1.Top, Chart1.Width, Chart1.Height));
  Printer.EndDoc;
0
 

Author Comment

by:genc_ymeri
ID: 6257015
When I read your code I thought this is what I meant but when I tried, it didn't work.

It prints out nothing.

PS:
D5/W2K
0
 
LVL 13

Accepted Solution

by:
Epsylon earned 100 total points
ID: 6257137
Maybe you have to change Form1 to the form with the chart.


You can also test it by placing a TPaintBox (System tab) on the form and use this to copy the chart to the paintbox:

PaintBox1.Canvas.CopyRect(PaintBox1.Canvas.ClipRect, Form1.Canvas, Bounds(Chart1.Left, Chart1.Top, Chart1.Width, Chart1.Height));
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:genc_ymeri
ID: 6260639
>PaintBox1.Canvas.CopyRect(PaintBox1.Canvas.ClipRect, Form1.Canvas, Bounds(Chart1.Left, Chart1.Top, Chart1.Width,
Chart1.Height));
....

it didn't work either
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6260738
It should work... Maybe you forgot to link a ButtonClick event or something like that...
0
 

Author Comment

by:genc_ymeri
ID: 6261982
Did you try it ?
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6262293
Yes, it works ok here.
0
 

Author Comment

by:genc_ymeri
ID: 6264850
Oh, It doesn't work here.
Would you E-mail the entire unit me please ?

PS:
genc_ymeri@hotmail.com
D5/W2K/Update Pack1/2
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8702084
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept Epsylon's comment as answer

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Thank you,
Russell

EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question