Gets the current AnnObject being edited.
public virtual AnnObject CurrentEditObject { get; } Public Overridable ReadOnly Property CurrentEditObject As Leadtools.Annotations.AnnObject
public:virtual property Leadtools.Annotations.AnnObject^ CurrentEditObject {Leadtools.Annotations.AnnObject^ get();}
The current AnnObject being edited; null (Nothing in VB) if no objects are currently being edited.
The current object being edited is the AnnObject currently "selected" where its AnnEditDesigner is currently active.
This is the object that will be processed when calling any of the object processing methods of this AnnAutomation. For example, calling Copy will copy the CurrentEditObject into the clipboard.
You can change the CurrentEditObject by calling StartEditing.
This example changes the pen of the object that is currently being edited to a Red pen that has a width of 2 pixels.
using Leadtools;using Leadtools.Annotations;using Leadtools.WinForms;using Leadtools.Drawing;public void AnnAutomation_ChangePenToBlue(AnnAutomation automation){// check if an object is currently "selected"if (automation.CurrentEditObject != null){// check if this object supports a penif (automation.CurrentEditObject.SupportsPen){// change its penautomation.BeginUndo();automation.CurrentEditObject.Pen = new AnnPen(Color.Blue, new AnnLength(2, AnnUnit.Pixel));automation.EndUndo();automation.Viewer.Invalidate(automation.CurrentEditObject.InvalidRectangle);}}}
Imports LeadtoolsImports Leadtools.AnnotationsImports Leadtools.WinFormsImports Leadtools.DrawingPublic Sub AnnAutomation_ChangePenToBlue(ByVal automation As AnnAutomation)' check if an object is currently "selected"If Not automation.CurrentEditObject Is Nothing Then' check if this object supports a penIf automation.CurrentEditObject.SupportsPen Then' change its penautomation.BeginUndo()automation.CurrentEditObject.Pen = New AnnPen(Color.Blue, New AnnLength(2, AnnUnit.Pixel))automation.EndUndo()automation.Viewer.Invalidate(automation.CurrentEditObject.InvalidRectangle)End 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
