Jump to content
Software FX Community

Programming Annotation objects


maggiecat
 Share

Recommended Posts

I wish to allow users to draw lines on a graph using the annotation toolbar. I trap the creation of the object and add a text annotation object associated with the line indicating the gradient of the line.

 I have several problems.

 The text object I create does not move as the graph scrolls and hence does not stay with the line.

If the user deletes the line the text object must be deleted also however can I access the existing annotation objects in code.

I would like the user to be able to move or edit the text object even thou I set AllowModify and AllowMove the text object cannot be moved.

 Am I missing some settings somewhere?

Link to comment
Share on other sites

1) You can group the two objects. You need to create an AnnotationGroup object and add both objects to it. This will group them together, they will be moved together, deleted together, etc.

2) Make sure that you set AnnotationExtension.EnableUI = true, otherwise there is no Mouse interaction with the annotation objects.

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...