ActiveReports 9
TextWidth Property
Example 

Gets or sets the amount of width, in inches, allocated to the text within the AnnotationLine object.
Syntax
'Declaration
 
Public Property TextWidth As System.Single
public System.float TextWidth {get; set;}

Property Value

A float or single value in inches.
Remarks
If the TextWidth property is set on the viewer to a value larger than the width of the AnnotationLine object, the AnnotationLine object is redrawn to accommodate the text.
Example
using GrapeCity.ActiveReports.Document.Section.Annotations;  
  
private void AddAnnotations()  
{  
    rptAnno rpt = new rptAnno();  
    rpt.Run();  
    this.viewer1.Document = rpt.Document;  
  
    AnnotationLine line = new AnnotationLine();  
    line.ArrowCapWidth = 4.5f;  
    line.ArrowCapHeight = 4.5f;  
    line.DashStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot;  
    line.DashCap = System.Drawing.Drawing2D.DashCap.Round;  
    line.ShowArrowCaps = AnnotationLine.ShowArrowCap.RightOnly;  
    line.FillArrowCaps = true;  
    line.LineColor = Color.Red;  
    line.LineWidth = 1;  
    line.LineLocation = AnnotationLine.LinePlacement.Bottom;  
    line.Text = "Please review.";  
    line.TextColor = Color.Blue;  
    line.TextAlignment = System.Drawing.StringAlignment.Center;  
    line.TextWidth = 1.2f;
              
    line.Attach(4, 4);  
    this.viewer1.Document.Pages[0].Annotations.Add(line);  
  
    line.Height = 0.50f;  
    line.Width = 1.5f;  
}
Imports GrapeCity.ActiveReports.Document.Section.Annotations

Private Sub AddAnnotations()
 Dim rpt As rptAnno = New rptAnno
 rpt.Run
 Me.viewer1.Document = rpt.Document

 Dim line As AnnotationLine = New AnnotationLine
 line.ArrowCapWidth = 4.5F
 line.ArrowCapHeight = 4.5F
 line.DashStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot
 line.DashCap = System.Drawing.Drawing2D.DashCap.Round
 line.ShowArrowCaps = AnnotationLine.ShowArrowCap.RightOnly
 line.FillArrowCaps = True
 line.LineColor = Color.Red
 line.LineWidth = 1
 line.LineLocation = AnnotationLine.LinePlacement.Bottom
 line.Text = "Please review."
 line.Font = New Font("Arial", 12F, FontStyle.Bold)
 line.TextColor = Color.Blue
 line.TextAlignment = System.Drawing.StringAlignment.Center

 line.Attach(4, 4)
 Me.viewer1.Document.Pages(0).Annotations.Add(line)

 line.Height = 0.5F
 line.Width = 1.5F
End Sub
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

AnnotationLine Class
AnnotationLine Members

 

 


Copyright © 2014 GrapeCity, inc. All rights reserved

Support Forum