Hello,
After returning from the TeeChart Print Preview Page, I'd like to know how the window was closed. I'd like to know if the user pressed the "Print" or "Close" button. Is there a way to determine this?
Thank you,
Jennifer Britt
Print Preview Results
Hello,
Here is some more specific information for this post
I want to print multiple pages of the same graph, where the tchart is modified for each printed page. Ideally, I'd like to display the ShowPreview page to allow the user to set up the printer, etc. Then, I'd like to know what the user entered. For example, if the user pressed "Cancel" from the "ShowPreview" page, then nothing would be printed.
If there is no way to do this now, will there be a way to do this in the future?
Thank you, as always, for any help.
Here is some more specific information for this post
I want to print multiple pages of the same graph, where the tchart is modified for each printed page. Ideally, I'd like to display the ShowPreview page to allow the user to set up the printer, etc. Then, I'd like to know what the user entered. For example, if the user pressed "Cancel" from the "ShowPreview" page, then nothing would be printed.
Code: Select all
printer.ShowPreview();
if (bPrint)
{
for (int i = pageBegin; i < pageEnd; i++)
{
myData[i].series.SetActive(true);
SetGraphTitle(myData[i].title);
printer.PrintChart();
myData[i].series.SetActive(false);
}
}
Thank you, as always, for any help.
Hi Jenn,
at this moment there's not a way to check it with the latest teechart version. The only way around would be in case you call the PrintChart manually (via code). In that way you will be able to use the OnBeforePrintChart event to check if chart is printed (I mean that if chart is printed this event will be called). This event is not called if the Chart is printed through the editor or previewer.
I've added this as a wish for the next maintenance releases (the ShowPreview call could return a boolean to know if print has been clicked or not).
at this moment there's not a way to check it with the latest teechart version. The only way around would be in case you call the PrintChart manually (via code). In that way you will be able to use the OnBeforePrintChart event to check if chart is printed (I mean that if chart is printed this event will be called). This event is not called if the Chart is printed through the editor or previewer.
I've added this as a wish for the next maintenance releases (the ShowPreview call could return a boolean to know if print has been clicked or not).
Pep Jorge
http://support.steema.com
http://support.steema.com