Page 1 of 1
Using TeeChart Print Preview & TeePreviewPanel
Posted: Fri Jul 26, 2013 6:53 pm
by 9524540
Hi,
I'm not having much luck finding all the info on this subject.
Once I have entered text using TeePreviewPanel1.Canvas.TextOut TeePreviewPanel1.PaperRect....
I launch the Print Preview dialog. The graph shows up including in the correct position as where it was set in the TeePreviewPanel, however the PaperRect text is not visible, and doesn't print. So what am I doing wrong?
See attached test program.
Using:
Windows XP SP3
VB6 SP6
TeeChart Pro ActiveX Control v2013
Thanks!
Re: Using TeeChart Print Preview & TeePreviewPanel
Posted: Tue Jul 30, 2013 9:48 am
by yeray
Hi,
The custom drawing should be done in the TeePreviewPanel's OnAfterDraw event.
However, I see it isn't available in the last versions. I've added it to the defect list to be revised asap (TA05016666).
In TeeChart ActiveX v8 I can do:
Code: Select all
Dim footer, header As Boolean
Private Sub Form_Load()
TeePreviewPanel1.Chart = TChart1
TeePreviewPanel1.Orientation = ppoLandscape
footer = False
header = False
End Sub
Private Sub mnuAddFooter_Click()
footer = True
TeePreviewPanel1.Repaint
End Sub
Private Sub mnuAddHeader_Click()
header = True
TeePreviewPanel1.Repaint
End Sub
Private Sub mnuPrint_Click()
TChart1.Printer.ShowPreview
End Sub
Private Sub TeePreviewPanel1_OnAfterDraw()
If footer Then
With TeePreviewPanel1.Canvas
.Font.Color = vbBlue
.BackColor = vbWhite
.Font.Size = 12
.TextOut TeePreviewPanel1.PaperRect.Left + 10, _
TeePreviewPanel1.PaperRect.Top + 190, _
"Footer Text"
End With
End If
If header Then
With TeePreviewPanel1.Canvas
.Font.Color = vbRed
.BackColor = vbWhite
.Font.Size = 12
.TextOut TeePreviewPanel1.PaperRect.Left + 10, _
TeePreviewPanel1.PaperRect.Top + 6, _
"Header Text"
End With
End If
End Sub
However, even with TeeChart ActiveX v8, I can't print the custom draws. I've added to the wish list the possibility to print the custom draws added in a TeePreviewPanel (TA05016670).
Re: Using TeeChart Print Preview & TeePreviewPanel
Posted: Wed Aug 07, 2013 9:10 pm
by 9524540
Thanks for looking at this.
Do you have a release date for the corrections?
Re: Using TeeChart Print Preview & TeePreviewPanel
Posted: Thu Aug 08, 2013 7:11 am
by yeray
Hi,
I'm afraid I can't tell you when this will be fixed/implemented.
Feel free to follow the following channels for new release announcements:
this forum,
RSS news feed,
Twitter and
Facebook
And check what's implemented on each new release looking at the public release notes:
https://www.steema.com/versioninfo/ax