LEADTOOLS Annotations (Leadtools.Annotations assembly)
LEAD Technologies, Inc

AnnTextRollupObject Class

Example 





Members 
This class provides support for creating and managing text rollup annotation objects.
Object Model
AnnTextRollupObject ClassAnnRectangle StructureAnnRectangle StructureAnnBrush ClassAnnContainer ClassAnnLength StructureAnnFont ClassAnnGroupObject ClassAnnFont ClassAnnPoint StructureAnnPoint StructureAnnPen ClassAnnPoint StructureAnnPoint StructureAnnLength StructureAnnUnitConverter Class
Syntax
Remarks

The text rollup annotation object extends AnnNoteObject by adding an Expanded property. When this property is set to false, the text rollup object looks and behaves like a normal note. When Expanded is set to false, the text rollup object will shrink to show only one line of text. This saves space on the container surface. For more information, refer to Using Text in Annotation Object. For more information about the text rollup annotation object refer to AnnTextRollupObject. For more information about the automated text rollup annotation object, refer to Annotation Objects - Automated Features.

Example
 
Private Sub AnnTextRollupObject_AnnTextRollupObject(ByVal viewer As RasterImageViewer, ByVal container As AnnContainer)
   Dim textRollup As AnnTextRollupObject = New AnnTextRollupObject()
   textRollup.Text = "My TextRollup object"
   textRollup.Font = New AnnFont("Arial", New AnnLength(10, AnnUnit.Point), FontStyle.Regular)
   textRollup.EdgeMargin = AnnLength.Empty
   textRollup.ShadowBorderWidth = New AnnLength(6, AnnUnit.Pixel)
   textRollup.Alignment = StringAlignment.Center
   textRollup.LineAlignment = StringAlignment.Center
   textRollup.Bounds = New AnnRectangle(100, 200, 400, 600, AnnUnit.Pixel)
   container.Objects.Add(textRollup)
   textRollup.Expanded = False
   viewer.Invalidate(textRollup.InvalidRectangle)
   MessageBox.Show("Not expanded")

   textRollup.Expanded = True
   viewer.Invalidate(textRollup.InvalidRectangle)
   MessageBox.Show("expanded")
End Sub
private void AnnTextRollupObject_AnnTextRollupObject(RasterImageViewer viewer, AnnContainer container)
{
   AnnTextRollupObject textRollup = new AnnTextRollupObject();
   textRollup.Text = "My TextRollup object";
   textRollup.Font = new AnnFont("Arial", new AnnLength(10, AnnUnit.Point), FontStyle.Regular);
   textRollup.EdgeMargin = AnnLength.Empty;
   textRollup.ShadowBorderWidth = new AnnLength(6, AnnUnit.Pixel);
   textRollup.Alignment = StringAlignment.Center;
   textRollup.LineAlignment = StringAlignment.Center;
   textRollup.Bounds = new AnnRectangle(100, 200, 400, 600, AnnUnit.Pixel);
   container.Objects.Add(textRollup);
   textRollup.Expanded = false;
   viewer.Invalidate(textRollup.InvalidRectangle);
   MessageBox.Show("Not expanded");

   textRollup.Expanded = true;
   viewer.Invalidate(textRollup.InvalidRectangle);
   MessageBox.Show("expanded");
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

AnnTextRollupObject Members
Leadtools.Annotations Namespace

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.