Jump to content
Software FX Community

Re: Annotation object print in incorrect position.


Software FX
 Share

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.

Frank

SFX

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...