TeePreviewPanel set Margins

TeeChart for ActiveX, COM and ASP
Post Reply
Mirosa
Newbie
Newbie
Posts: 2
Joined: Fri Oct 01, 2004 4:00 am
Contact:

TeePreviewPanel set Margins

Post by Mirosa » Thu Aug 03, 2006 4:23 pm

Hi, i have a problem with set margins in TeePreviewPanel. he has only an event OnChangeMargins, but i do not know haw i can set margins. I need a Button "Set default margins". In tutorial and this forum i finded no solution. Thanks

I have a TeeChart Pro ActiveX v7.

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

Post by Pep » Thu Aug 03, 2006 9:29 pm

Hi Mirosa,

you can change the margins using something like the following code :

Code: Select all

Private Sub Command1_Click()
  With TChart1.Printer
    .PrintProportional = False
    .MarginLeft = 2
    .MarginTop = 2
    .MarginRight = 60
    .MarginBottom = 60
  End With
  TeePreviewPanel1.AddChart TChart1
  TeePreviewPanel1.Repaint
End Sub

Post Reply