←Select platform

Edit Event

Summary
Occurs when an AnnObject is being edited.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public event EventHandler<AnnEditDesignerEventArgs> Edit 
- (void)automation:(LTAnnAutomation *)automation edit:(LTAnnEditDesignerEventArgs *)args; 
public void addEditDesignerdListener(AnnEditDesignerListener listener) 
public void removeEditDesignerListener(AnnEditDesignerListener listener) 
public:  
   event EventHandler<AnnEditDesignerEventArgs^>^ Edit 
def Edit(sender,e): # sender: AnnAutomation e: Leadtools.Annotations.Engine.AnnEditDesignerEventArgs 
Event Data

The event handler receives an argument of type AnnEditDesignerEventArgs containing data related to this event. The following AnnEditDesignerEventArgs properties provide information specific to this event.

PropertyDescription
Cancel A value indicating whether the edit operation should be canceled.
Remarks

When an object is being edited, the automation object will hook the object edit designer's AnnEditDesigner.Edit to this event. Therefore, instead of hooking and unhooking to the various designers edit events, you can simply subscribe to this event once.

Example

This example will show how to track when an object is edited.

Start with the AnnAutomationManager example, remove all the code inside the example function (search for the // TODO: add example code here comment) and insert the following code:

Click the example button. Now whenever you move or resize an object, you will get the message.

C#
using Leadtools.Annotations.Automation; 
 
using Leadtools.Annotations.Engine; 
using Leadtools.Codecs; 
using Leadtools.Controls; 
using Leadtools.Annotations.Rendering; 
using Leadtools.Annotations.WinForms; 
 
public void AnnAutomation_Edit() 
{ 
   // Hook to the automation's Edit event 
   _automation.Edit += _automation_Edit; 
} 
 
void _automation_Edit(object sender, AnnEditDesignerEventArgs e) 
{ 
   if (e.OperationStatus == AnnDesignerOperationStatus.End) 
      Debug.WriteLine("Object changed..."); 
} 
Requirements

Target Platforms

Help Version 22.0.2023.4.25
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations.Automation Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.