Occurs when the text of an AnnObject is edited.
public event EventHandler<AnnEditTextEventArgs> EditTextPublic Event EditText As EventHandler(Of AnnEditTextEventArgs)public event EventHandler<AnnEditTextEventArgs> EditText-(void) automation:(LTAnnAutomation*) automationeditTextWithArgs:(LTAnnEditTextEventArgs*) e;
public void addEditTextListener(AnnEditTextListener listener)public void removeEditTextListener(AnnEditTextListener listener)
add_EditText(function(sender, e))remove_EditText(function(sender, e))
The event handler receives an argument of type AnnEditTextEventArgs containing data related to this event. The following AnnEditTextEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| Bounds | Gets the bounding rectangle of the AnnTextObject entering text-editing mode in screen/device coordinates. |
| Cancel | Gets or sets a value indicating whether edit mode should be canceled. |
| TextObject | Gets the AnnTextObject that is entering text-editing mode. |
This event will occur when the object being edited is a text object and the user initiates edit mode. For more information, refer to AnnTextEditDesigner.EditText.
If the value of EditTextAfterDraw is set to true, then this event will occur automatically after the designer finishes drawing new text objects.
This example will show how to change the string used by an annotation text object when it enters edit mode.
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 then draw a text object and double click on it.
using Leadtools.Annotations.Automation;using Leadtools.Annotations.Core;using Leadtools.Codecs;using Leadtools.Controls;using Leadtools.Annotations.Rendering;using Leadtools.Annotations.WinForms;public void AnnAutomation_EditText(){// Hook to the automation's EditText event_automation.EditText += _automation_EditText;}void _automation_EditText(object sender, AnnEditTextEventArgs e){// In your application, you could show a dialog to enter the new text value or create// a text element on the page for editing// e is of type AnnEditTextEventArgs// Get the text annotation objectAnnTextObject textObj = e.TextObject;// Change its texttextObj.Text = "After edit";// Invalidate it_automation.Invalidate(LeadRectD.Empty);}
using Leadtools.Annotations.Automation;using Leadtools.Controls;using Leadtools.Converters;using Leadtools.Annotations.Core;using Leadtools.Codecs;public void AnnAutomation_EditText(){// Hook to the automation's EditText event_automation.EditText += _automation_EditText;}void _automation_EditText(object sender, AnnEditTextEventArgs e){// In your application, you could show a dialog to enter the new text value or create// a text element on the page for editing// e is of type AnnEditTextEventArgs// Get the text annotation objectAnnTextObject textObj = e.TextObject;// Change its texttextObj.Text = "After edit";// Invalidate it_automation.Invalidate(LeadRectDHelper.Empty);}
|
Products |
Support |
Feedback: EditText Event - Leadtools.Annotations.Automation |
Introduction |
Help Version 19.0.2017.3.22
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.