Jump to content
Software FX Community

Annotation Line


User (Legacy)

Recommended Posts

I want an annotation line to follow the mouse around... So I put the

following code in chartfx_mousmoving event:

Static doneyet As Boolean

If doneyet = False Then

Set an_line = AnoExt.Add(OBJECT_TYPE_ARROW)

an_line.HeadStyle = ARROW_NONE

an_line.TailStyle = ARROW_NONE

an_line.Color = vbWhite

an_line.AllowModify = False

an_line.AllowMove = False

an_line.Width = ChartFX.Width

doneyet = True

an_line.Left = 0

an_line.Top = 0

an_line.Refresh False

End If

an_line.Top = y

ChartFX.Refresh

Works well but with lots of flicker, is there any way around this?

Thanks,

Chase Gale

Link to comment
Share on other sites

Two suggestions:

1) Instead of calling ChartFX.Refresh do:

an_line.Refresh true

Before AND after moving it, this way you will refresh only the rectangles

containing the old and new arrows instead of the whole chart area.

2) If the flicker is still apparent, you can use a style in the chart called

CSE_SMOOTH (see StyleEx property), this will eliminate the flickering but

drawing will be slower.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...