Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, April 28, 2011 4:37:15 AM(UTC)

tpinc  
tpinc

Groups: Registered
Posts: 11


Hi all,

I'm looking to add Annotations to an existing viewer form. The problem I'm having is that the Automation Manager will only use it's own toolbar. I don't want to use the built in toolbar. I want to hit a button that I've added to the form (not from the automation manager) and have the automation manager respond as if I had clicked it's toolbar. The reason for this is that the Automation Manager toolbar does not fit with the theming we use. I can create buttons and such, but I don't have any idea how to tell the Automation Manager to use, for example, a Stamp annotation and do its normal drawing/adding to the viewer.

Additionally I can add the object and set it to be editing on the viewer, but a simple double click on a Note annotation causes an unhandled exception from the LEAD library as if there is no associated Text editor designer.

Any help will be greatly appreciated.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, April 28, 2011 7:56:11 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

First, you have to call the AutomationManager.CreateDefaultObjects() method.
And then you can sepecify the annotation object that you want by using the AutomationManager.CurrentObjectId property as follows:
//To create a stamp object
AutomationAnn.Manager.CurrentObjectId = AnnAutomationManager.StampObjectId;

//To create  rectangle object
AutomationAnn.Manager.CurrentObjectId = AnnAutomationManager.RectangleObjectId;

About the second issue, please send more details on how to reproduce the behavior so we can check it for you in a new forum post because this issue is not related to the first question. Also, if you can reproduce this behavior using our Annotation Automation demo, please send us the details and mention which LEADTOOLS version are you using.
 
#3 Posted : Monday, May 2, 2011 10:30:33 AM(UTC)

tpinc  
tpinc

Groups: Registered
Posts: 11


Thanks Adnan, that solved the issue.

The second issue is no longer an issue for me because of the first point.

To re-create: Create an AnnObject (e.g. AnnTextObject), populate its properties, then add it to the Container and start editing, when you double click it doesn't know what designer to use. Since I'm not taking this route, you can disregard this.

For example:

Dim oAnnObject As Leadtools.Annotations.AnnHiliteObject = Nothing

oAnnObject = New Leadtools.Annotations.AnnHiliteObject _
With {.Brush = New Leadtools.Annotations.AnnSolidBrush(Color.Yellow), _
.HiliteColor = Color.Yellow, _
.Bounds = New Leadtools.Annotations.AnnRectangle(0, 0, 600, 300)}

annContainer.Objects.Add(oAnnObject)
annAutomation.StartEditing(oAnnObject, False)
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.097 seconds.