Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Adding another Stamp button in AnnAutomation tool bar
Started by rmssemp at 11-26-2007 15:20. Topic has 3 replies.

Print Search « Previous Thread Next Thread »
  11-26-2007, 15:20
rmssemp is not online. Last active: 11/26/2007 8:16:06 PM rmssemp

Not Ranked
Joined on 11-26-2007
Posts 5
Adding another Stamp button in AnnAutomation tool bar
Reply Quote

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?

 

 

 


   Report 
  11-26-2007, 16:21
BoydP is not online. Last active: 1/18/2008 7:04:31 PM BoydP



Top 25 Posts
Joined on 08-22-2007
Posts 230
Re: Adding another Stamp button in AnnAutomation tool bar
Reply Quote
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.


Boyd Perkins
LEADTOOLS Technical Support
   Report 
  11-27-2007, 8:34
rmssemp is not online. Last active: 11/26/2007 8:16:06 PM rmssemp

Not Ranked
Joined on 11-26-2007
Posts 5
Re: Adding another Stamp button in AnnAutomation tool bar
Reply Quote

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

 

 

 


   Report 
  11-27-2007, 11:53
BoydP is not online. Last active: 1/18/2008 7:04:31 PM BoydP



Top 25 Posts
Joined on 08-22-2007
Posts 230
Re: Adding another Stamp button in AnnAutomation tool bar
Reply Quote
Sure, just follow the guidelines laid out in "Implementing User Defined Objects With LEADTOOLS Annotations".

Boyd Perkins
LEADTOOLS Technical Support
   Report 
Post
LEAD Support Fo... » Developer » Annotations » Adding another Stamp button in AnnAutomation tool bar

Powered by Community Server, by Telligent Systems