Solved

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

Posted on 2001-07-05
10
250 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
  • 4
  • 4
10 Comments
 
LVL 13

Expert Comment

by:Epsylon
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

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

it didn't work either
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 13

Expert Comment

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

Author Comment

by:genc_ymeri
Comment Utility
Did you try it ?
0
 
LVL 13

Expert Comment

by:Epsylon
Comment Utility
Yes, it works ok here.
0
 

Author Comment

by:genc_ymeri
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now