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 : Monday, November 26, 2007 10:15:49 AM(UTC)

rmssemp  
rmssemp

Groups: Registered
Posts: 5


I want to add a check mark on each paragraph on a tif file. I am using AnnAutomationManager and I am already using Stamp button to put the signature of the users on the tif, Can I add another Stamp button on the tool bar? If you so, how would I do that?

 

 

 

 

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 : Monday, November 26, 2007 11:16:40 AM(UTC)

BoydP  
Guest

Groups: Guests
Posts: 3,022

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

I would recommend reading this section in the help file, it details how to create your own annotation objects, "Implementing User Defined Objects With LEADTOOLS Annotations".

Here is some code which shows how to setup an automation objects toolbar button which will be automatically created after you add the object to the manager and call CreateToolBar.

AnnAutomationObject autObj = new AnnAutomationObject();
// setup the ID
autObj.Id = AnnAutomationManager.UserObjectId;

// give it a friendly name
autObj.Name = "Checkmark";

 // setup the object template
YourCheckmarkObject obj = new YourCheckMarkObject();
autObj.Object = obj;

// we need a toolbar image, so create one
Bitmap btmp = new Bitmap(16, 16);

//this code is currently drawing a triangle but can be easily modified to draw a checkmark
using(Graphics g = Graphics.FromImage(btmp))
{
g.FillRectangle(Brushes.Magenta, 0, 0, 16, 16);
g.DrawLine(Pens.Black, 8, 2, 14, 14);
g.DrawLine(Pens.Black, 14, 14, 2, 14);
g.DrawLine(Pens.Black, 2, 14, 8, 2);
}
autObj.ToolBarImage = btmp;
// setup the toolbar button tooltip text
autObj.ToolBarToolTipText = "Checkmark";

manager.Objects.Add(autObj);
manager.CreateToolBar();

This code was pulled from the help file in the section I posted, stripped down to just the code necessary for adding a toolbar button.  Let me know if you have anymore questions.
 
#3 Posted : Tuesday, November 27, 2007 3:29:50 AM(UTC)

rmssemp  
rmssemp

Groups: Registered
Posts: 5


I want to replicate the AnnStampObject functionality. Can I create an object that  inherits the AnnStampObject?

 

 

 

 
#4 Posted : Tuesday, November 27, 2007 6:48:56 AM(UTC)

BoydP  
Guest

Groups: Guests
Posts: 3,022

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

Sure, just follow the guidelines laid out in "Implementing User Defined Objects With LEADTOOLS Annotations".
 
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.056 seconds.