Using TeeChart Print Preview & TeePreviewPanel

TeeChart for ActiveX, COM and ASP
Post Reply
tirby
Newbie
Newbie
Posts: 16
Joined: Wed Oct 13, 2004 4:00 am

Using TeeChart Print Preview & TeePreviewPanel

Post by tirby » Fri Jul 26, 2013 6:53 pm

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!
Attachments
TextPrintTest.Zip
(2.65 KiB) Downloaded 877 times

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Using TeeChart Print Preview & TeePreviewPanel

Post by Yeray » Tue Jul 30, 2013 9:48 am

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).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

tirby
Newbie
Newbie
Posts: 16
Joined: Wed Oct 13, 2004 4:00 am

Re: Using TeeChart Print Preview & TeePreviewPanel

Post by tirby » Wed Aug 07, 2013 9:10 pm

Thanks for looking at this.
Do you have a release date for the corrections?

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Using TeeChart Print Preview & TeePreviewPanel

Post by Yeray » Thu Aug 08, 2013 7:11 am

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
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply