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


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


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.



Software FX, Inc.

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.

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.


  • Create New...