Jump to content
Software FX Community

Re: Annotation object print in incorrect position.

Software FX

Recommended Posts

The problem here is that the bottom of the Y-Axis will move when the chart 

is resized or printed. You can use the PostPaint event to move the object to

the bottom of the chart every time the chart is drawn. This way you will

endure that it will be at the bottom no matter what size. The following is

an example of this in VB:

Private Sub ChartFX1_PrePaint(ByVal w As Integer, ByVal h As Integer, ByVal

lPaint As Long, nRes As Integer)

Dim y As Integer

If ChartFX1.PaintInfo(CPI_PRINTINFO) Then ' Need to re-scale

h = Int(h * (Printer.TwipsPerPixelY / Screen.TwipsPerPixelY))

End If

GlobalRect.Top = h - GlobalRect.Height

End Sub

Suppose that GlobalRect points to the annotation object you want to place at

the bottom.



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...