editText Event

Summary

Occurs when the text of an AnnObject is edited.

Syntax

JavaScript Syntax
Object.defineProperty(AnnAutomation.prototype,'editText',  
	get: function(), 
	set: function(value) 
) 
function editText.add(function(sender, e)); 
function editText.remove(function(sender, e)); 
TypeScript Syntax
editText: void; 

Remarks

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.

Example

The following 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.

JavaScript Example
example: function SiteLibrary_DefaultPage$example() { 
   var _this = this; 
   // Hook to the automation's EditText event 
   this._automation.add_editText(function(sender, 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 object 
      var textObj = e.get_textObject(); 
      // Change its text 
      textObj.set_text("After edit"); 
      // Invalidate it 
      _this._automation.invalidate(lt.LeadRectD.get_empty()); 
   }); 
}, 

Event Data
ParameterTypeDescription
sendervarThe source of the event.
eAnnEditTextEventArgsThe event data.
Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations.Automation Assembly