Leadtools.Annotations Namespace : AnnGroupObject Class |
[SerializableAttribute()] public class AnnGroupObject : AnnObject, IAnnProtractorObject, IAnnRulerObject, IAnnTextObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
'Declaration <SerializableAttribute()> Public Class AnnGroupObject Inherits AnnObject Implements IAnnProtractorObject, IAnnRulerObject, IAnnTextObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
'Usage Dim instance As AnnGroupObject
[SerializableAttribute()] public ref class AnnGroupObject : public AnnObject, IAnnProtractorObject, IAnnRulerObject, IAnnTextObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
For more information about grouping and ungrouping, refer to Grouping and Ungrouping Annotation Objects.
Imports Leadtools Imports Leadtools.Annotations Imports Leadtools.Codecs Imports Leadtools.WinForms Private Sub AnnGroupObject_AnnGroupObject(ByVal container As AnnContainer) Dim group As AnnGroupObject = New AnnGroupObject() ' move the objects to the group Do While container.Objects.Count > 0 Dim obj As AnnObject = container.Objects(0) container.Objects.RemoveAt(0) group.Objects.Add(obj) Loop ' add the group to the container container.Objects.Add(group) End Sub
using Leadtools; using Leadtools.Annotations; using Leadtools.Codecs; using Leadtools.WinForms; private void AnnGroupObject_AnnGroupObject(AnnContainer container) { AnnGroupObject group = new AnnGroupObject(); // move the objects to the group while(container.Objects.Count > 0) { AnnObject obj = container.Objects[0]; container.Objects.RemoveAt(0); group.Objects.Add(obj); } // add the group to the container container.Objects.Add(group); }