Gets or sets a value indicating whether the designer will automatically resize the AnnTextObject being edited after the user finish editing it.
public bool AutoSizeAfterEdit { get; set; } Public Property AutoSizeAfterEdit As Boolean
true for the designer to automatically resize the AnnTextObject being edited after the user finish editing it, false; otherwise. Default value is false.
When the value of this property is set to true, the designer will call the AnnTextObject.AutoSize method when it has finished editing the object.
using Leadtools;using Leadtools.Annotations;using Leadtools.Codecs;using Leadtools.WinForms;public void AnnTextEditDesigner_AutoSizeAfterEditExample(AnnAutomation automation){// We will hook to the Automation designer changed event,// if the designer is a Text edit designer, we will set// its AutoSizeAfterEdit value to trueautomation.CurrentDesignerChanged += new EventHandler(automation_CurrentDesignerChanged);}private void automation_CurrentDesignerChanged(object sender, EventArgs e){// Check if current designer is AnnTextEditDesignerAnnAutomation automation = sender as AnnAutomation;if (automation.CurrentDesigner != null){AnnTextEditDesigner textEditDesigner = automation.CurrentDesigner as AnnTextEditDesigner;if (textEditDesigner != null){// Yes, set its AutoSizeAfterEdit value to truetextEditDesigner.AutoSizeAfterEdit = true;}}}
Imports LeadtoolsImports Leadtools.AnnotationsImports Leadtools.CodecsImports Leadtools.WinFormsPublic Sub AnnTextEditDesigner_AutoSizeAfterEditExample(ByVal automation As AnnAutomation)' We will hook to the Automation designer changed event,' if the designer is a Text edit designer, we will set' its AutoSizeAfterEdit value to trueAddHandler automation.CurrentDesignerChanged, AddressOf automation_CurrentDesignerChangedEnd SubPrivate Sub automation_CurrentDesignerChanged(ByVal sender As Object, ByVal e As EventArgs)' Check if current designer is AnnTextEditDesignerDim automation As AnnAutomation = CType(sender, AnnAutomation)If Not automation.CurrentDesigner Is Nothing ThenIf TypeOf automation.CurrentDesigner Is AnnTextEditDesigner Then' Yes, set its AutoSizeAfterEdit value to trueDim textEditDesigner As AnnTextEditDesigner = CType(automation.CurrentDesigner, AnnTextEditDesigner)textEditDesigner.AutoSizeAfterEdit = TrueEnd IfEnd IfEnd Sub
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
