Gets the current AnnObject being edited.
public Leadtools.Annotations.Core.AnnObject CurrentEditObject {get;}
Public ReadOnly Property CurrentEditObject As Leadtools.Annotations.Core.AnnObject
public Leadtools.Annotations.Core.AnnObject CurrentEditObject {get;}
@property (nonatomic,retain,readonly) LTAnnObject* currentEditObject;
public AnnObject getCurrentEditObject()
get_CurrentEditObject();
The current AnnObject being edited; null 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.
You can change the CurrentEditObject by calling SelectObject or SelectObjects.
This example changes the stroke of the object that is currently being edited to a red stroke that has a length of 2.
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_CurrentEditObject()
{
// check if an object is currently "selected"
AnnObject currentEditObject = _automation.CurrentEditObject;
if (currentEditObject != null)
{
// check if this object supports a stroke
if (currentEditObject.SupportsStroke)
{
// change its stroke
_automation.BeginUndo();
currentEditObject.Stroke = AnnStroke.Create(AnnSolidColorBrush.Create("Blue"), LeadLengthD.Create(2));
_automation.EndUndo();
_automation.Invalidate(LeadRectD.Empty);
}
else
{
Debug.WriteLine("This object does not support stroke, select another object");
}
}
else
{
Debug.WriteLine("Select an object first");
}
}
using Leadtools.Annotations.Automation;
using Leadtools.Controls;
using Leadtools.Converters;
using Leadtools.Annotations.Core;
using Leadtools.Codecs;
public void AnnAutomation_CurrentEditObject()
{
// check if an object is currently "selected"
AnnObject currentEditObject = _automation.CurrentEditObject;
if (currentEditObject != null)
{
// check if this object supports a stroke
if (currentEditObject.SupportsStroke)
{
// change its stroke
_automation.BeginUndo();
currentEditObject.Stroke = AnnStroke.Create(AnnSolidColorBrush.Create("Blue"), LeadLengthDHelper.Create(2));
_automation.EndUndo();
_automation.Invalidate(LeadRectDHelper.Empty);
}
else
{
Debug.WriteLine("This object does not support stroke, select another object");
}
}
else
{
Debug.WriteLine("Select an object first");
}
}
![]() |
Products |
Support |
Feedback: CurrentEditObject Property - 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.