LEADTOOLS Annotations (Leadtools.Annotations assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
AnnGroupObject Class
See Also  Members  
Leadtools.Annotations Namespace : AnnGroupObject Class



The AnnGroupObject Class is available in LEADTOOLS Document and Medical Imaging toolkits.

This class provides support for creating and managing annotation group objects.

Object Model

AnnGroupObject ClassAnnLength StructureAnnRectangle StructureAnnBrush ClassAnnContainer ClassAnnLength StructureAnnFont ClassAnnPen ClassAnnPen ClassAnnLength StructureAnnGroupObject ClassAnnFont ClassAnnPoint StructureAnnPen ClassAnnPoint StructureAnnPen ClassAnnPoint StructureAnnPoint StructureAnnLength StructureAnnUnitConverter Class

Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class AnnGroupObject 
   Inherits AnnObject
   Implements IAnnProtractorObjectIAnnRulerObjectIAnnTextObjectICloneableIDisposableISerializable 
Visual Basic (Usage)Copy Code
Dim instance As AnnGroupObject

Example

This example moves all the objects from a container into a new group object.

Visual BasicCopy Code
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
C#Copy Code
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);
}

Remarks

The annotation group object contains a collection of annotation objects from any class that is derived from theAnnObject class. This collection of objects can be treated as one while they are in a group. An annotation object can be in either a container or a group but not both at the same time.

For more information about grouping and ungrouping, refer to Grouping and Ungrouping Annotation Objects.

Inheritance Hierarchy

System.Object
   Leadtools.Annotations.AnnDrawable
      Leadtools.Annotations.AnnObject
         Leadtools.Annotations.AnnGroupObject

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

Leadtools.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features