Page 1 of 1

is there something like onAfterPrintTchart event and more..?

Posted: Fri Jun 03, 2005 5:18 pm
by 9080443
Hi,

1) While printing the chart I am faced with some problems with font of canvas which is changed to extremely large size for printout. How can I keep it the same size as it is before print?

2) I am changing some chart look and feel properties for printout in OnBeforePrint and after a print I need to change them back for normal display. But I can't seem find a way to do it because there is no event signaling of print has been finished. Any ideas on these issues?

As always thank you for any help. I do appreciate it.

Michael.

Posted: Mon Jun 06, 2005 2:30 pm
by 9080443
Any ideas? Thanks.

Posted: Wed Jun 08, 2005 11:31 am
by 9080443
Actually great support forum :?

Posted: Wed Jun 08, 2005 3:20 pm
by Pep
Hi Michael,

sorry for delay.
1)
This may occur on output to some Printers. It can normally be resolved by setting Font.Height instead of Font Size. The helpfile topic for Font.Height gives a few more details about use. Also, to see the correct results you'll have to create an .exe file from your project and print from there

2)
You could change the aspect of the Chart in the OnBeforePrint event, export the chart to stream or file and after the it has been printed, import it again.
Dim Stream
Stream = TChart1.Export.asNative.SaveToStream(False)
TChart1.Import.LoadFromStream Stream

Posted: Fri Jun 10, 2005 12:19 pm
by 9080443
Hi Pep,

Thank you for reply. But given attention to issue #2, how I still find out if printing finished. As I understood your idea is

1) Export the chart to stream with regular view before print
2) chage look and feel for pritnout in OnBeforePrint which is ok
3) Import the chart from the stream after the print. But how can I know when the printing finished?

In the OnBeforePrint I am setting m_bPrinting = TRUE and OnAfterDraw knowing the m_bPrinting value I am applying look and feel changes. But I need an event where I can set m_bPrinitg = FALSE and import the chart which was before print or just OnAfterDraw knowing that print was finished m_bPrinting = FALSE to revert to normal chart properties.

Thanks.

Posted: Mon Jun 20, 2005 2:03 pm
by Pep
Hi,

3) You will have to put your code after the :
TChart1.Printer.PrintChart line.