SelectionObject Property (original) (raw)

Summary

Gets or sets the selection object used by this AnnContainer.

Syntax

C#

Objective-C

C++/CLI

Java

Python

@property (nonatomic, strong) LTAnnSelectionObject *selectionObject; 

public AnnSelectionObject getSelectionObject() public void setSelectionObject(AnnSelectionObject object)

Property Value

The AnnSelectionObject used by this AnnContainer. The default value is a new AnnSelectionObject instance with its Stroke set to a dark green AnnStroke object with length of 2. This value cannot be null.

Example

using Leadtools.Annotations.Automation; using Leadtools.Annotations.Engine; using Leadtools.Codecs; using Leadtools.Annotations.WinForms; public void AnnContainer_SelectionObject() { // Get the selection object automation and update its template AnnAutomationObject autSelectionObject = _automation.Manager.FindObjectById(AnnObject.SelectObjectId); Debug.WriteLine($"Selection Object Friendly Name: {_automation.ActiveContainer.SelectionObject.FriendlyName}"); // Change its template stroke autSelectionObject.ObjectTemplate.SelectionStroke = AnnStroke.Create(AnnSolidColorBrush.Create("black"), LeadLengthD.Create(1)); Debug.WriteLine("Draw the selection object and see how the new stroke looks"); }