How to change the preview window title

TeeChart for ActiveX, COM and ASP
Post Reply
David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

How to change the preview window title

Post by David » Tue Dec 06, 2005 1:31 am

Hi, there,

I wrote an dialog-based app named TeeChartTest to test the print and print preview function and I added a botton on the dialog to call m_chart1.GetPrinter().ShowPreview(); It worked fine except that the title of the preview window is "Teechart Print Preview", not what I expected to be "TeeChartTest Print Preview". Is there any way to change the preview window title? Thank you!

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Dec 09, 2005 11:34 am

Hi David,

yes, it can be changed, but you've to add a TPreviewer component into the form, assign it to the Chart (using ChartLink) and then use the PreviewTitle property to set a customized title i.e. :

TeePreviewer1.SetPreviewTitle(customtitle);
TeePreviewer1.ShowPreview();

Post Reply