Print Dialog - Set form caption

TeeChart for ActiveX, COM and ASP
Post Reply
paligap
Newbie
Newbie
Posts: 19
Joined: Tue Feb 24, 2004 5:00 am
Location: Australia

Print Dialog - Set form caption

Post by paligap » Sat Mar 20, 2004 2:32 pm

How can I set the print dialog to something other than the default "TeeChart Print Preview". I would like to set this through code. I cannot seem to find reference to this.

Thanks

Paligap

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

Post by Pep » Sun Mar 21, 2004 4:06 pm

Hi PaliGap,

using the TeePreviewer component you can do :
TeePreviewer1.PreviewTitle = "My custom Title"

paligap
Newbie
Newbie
Posts: 19
Joined: Tue Feb 24, 2004 5:00 am
Location: Australia

Post by paligap » Tue Mar 23, 2004 9:07 am

I am opening the print preview through the following command. This is performed through the click event of a button on the form, on the form is also the displayed chart.

ChartName.Printer.ShowPreview

This then opens the print dialog. How can I set the title of he dialog when opening it this way.

Regards

Paligap

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

Post by Pep » Tue Mar 23, 2004 11:53 am

Hi Paligap,

the only way that I know of is placing a TeePreviewer component on the Form and use the following code to show the Preview :

Code: Select all

With TeePreviewer1
    .Chart = TChart1
    .PreviewTitle = "My Custom Title"
    .ShowPreview
End With

Post Reply