PrintPreviewPanel does not accept PrintDialog Settings.

TeeChart for ActiveX, COM and ASP
Post Reply
M.Takeda
Newbie
Newbie
Posts: 18
Joined: Tue Aug 17, 2004 4:00 am

PrintPreviewPanel does not accept PrintDialog Settings.

Post by M.Takeda » Mon Sep 27, 2004 10:47 pm

Atten. Josep Lluis Jorge
Thank you for your effort to understand my question.
Simply my help is that.

In VB.NET with TChartAX(V6),the printpreviewpanel does not
accept a printdialog setting.
I wish to print multi chart in a paper by following procedure.
AxPreviewPanel show-->PrintDialog-->AxPreviewPanel.Print
In case using AxPrintPreviewer,it can do this but single chart a peper.

Same procedure works well in TChartVCL.

Thank you again in advance. Best Regards,

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Sep 28, 2004 6:57 am

Hi --
In VB.NET with TChartAX(V6),the printpreviewpanel does not
accept a printdialog setting.
I wish to print multi chart in a paper by following procedure.
AxPreviewPanel show-->PrintDialog-->AxPreviewPanel.Print
In case using AxPrintPreviewer,it can do this but single chart a peper.
Try:

Code: Select all

  '------------------------------------------ 
    'Start Pring after execute printdialog 
    '------------------------------------------ 
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim result As DialogResult

        PrintDialog1.PrinterSettings = New Printing.PrinterSettings
        result = PrintDialog1.ShowDialog()

        If result = DialogResult.OK Then
            For i As Integer = 0 To AxTChart1.Printer.PrinterCount - 1
                If AxTChart1.Printer.PrinterDescription(i) = PrintDialog1.PrinterSettings.PrinterName Then
                    AxTChart1.Printer.PrinterIndex = i
                    AxTChart2.Printer.PrinterIndex = i
                    AxTeePreviewPanel1.PrintPage()
                End If
            Next
        End If
    End Sub
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply