Page 1 of 1

TeePreviewPanel set Margins

Posted: Thu Aug 03, 2006 4:23 pm
by 9524396
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.

Posted: Thu Aug 03, 2006 9:29 pm
by Pep
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