TeePreviewPanel Printing
Posted: Tue Dec 06, 2005 7:53 pm
I am Using VB6 + TeeChart AX 6.0
I have combined 8 charts into one TeePreviewPanel and am having the following problems:
1. I need to print a Title for every page I print - which consists of many charts. I cannot print the Text that I am writing to the canvas. The example you have is for adding text to a tchart. I need to do it for a teePreviewPanel. I wrote the text in the following way:
Private Sub tpp1_OnAfterDraw()
Dim PrintText as String
PrintText = “Hydraulic Pressure in PSI”
With tpp1.Canvas
.Font.Color = vbBlue
.Font.Size = 10
.TextOut PrintX, 100, PrintText
End With
End Sub
This shows on the screen but does not print. I have seen one example you have http://www.teechart.net/support/viewtop ... t=printing but that is for the Chart Canvas and not the TeePreviewPanel. Please provide complete working code if possible.
2. How do I Center the text Horizontally? The Printer.TextWidth and TeePreviewPanel.Canvas.Left and TeePreviewPanel.Canvas.Width are different units. So I cannot center the text.
3. How can I get a Printer Dialog Box if I want to print a TeePreviewPanel? We need to re-direct the print to a black and white or color printer – so we need to see that dialog. TeePreviewPanel.PrintPage sends the output directly to the printer.
Thanks.
I have combined 8 charts into one TeePreviewPanel and am having the following problems:
1. I need to print a Title for every page I print - which consists of many charts. I cannot print the Text that I am writing to the canvas. The example you have is for adding text to a tchart. I need to do it for a teePreviewPanel. I wrote the text in the following way:
Private Sub tpp1_OnAfterDraw()
Dim PrintText as String
PrintText = “Hydraulic Pressure in PSI”
With tpp1.Canvas
.Font.Color = vbBlue
.Font.Size = 10
.TextOut PrintX, 100, PrintText
End With
End Sub
This shows on the screen but does not print. I have seen one example you have http://www.teechart.net/support/viewtop ... t=printing but that is for the Chart Canvas and not the TeePreviewPanel. Please provide complete working code if possible.
2. How do I Center the text Horizontally? The Printer.TextWidth and TeePreviewPanel.Canvas.Left and TeePreviewPanel.Canvas.Width are different units. So I cannot center the text.
3. How can I get a Printer Dialog Box if I want to print a TeePreviewPanel? We need to re-direct the print to a black and white or color printer – so we need to see that dialog. TeePreviewPanel.PrintPage sends the output directly to the printer.
Thanks.