Solved

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

Posted on 2001-07-05
10
260 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
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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 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

14 Experts available now in Live!

Get 1:1 Help Now