ActiveReports.Viewer3 Request technical support
Width Property
See Also  Example


Gets or sets the width of the annotation object, in inches.

Syntax

Visual Basic (Declaration) 
Public Overridable Property Width As Single
Visual Basic (Usage)Copy Code
Dim instance As Annotation
Dim value As Single
 
instance.Width = value
 
value = instance.Width
C# 
public virtual float Width {get; set;}

Return Value

A float or single value in inches.

Example

C#Copy Code
using DataDynamics.ActiveReports.Viewer.Annotations;

rptAnnotations rpt =
new rptAnnotations();
private void AddAnnotations()
{
  
//Run the report first
  
rpt.Run();
  
  
//Assign the viewer
  
this.viewer1.Document = rpt.Document;
  
  
//Create an annotation and assign property values
  
AnnotationCircle circle = new AnnotationCircle();
  circle.Color = System.Drawing.Color.GreenYellow;
  circle.Border.Color = System.Drawing.Color.Chartreuse;
 
  
//Add the annotation
  
circle.Attach(1,1); //screen location
  
this.viewer1.Document.Pages[0].Annotations.Add(circle);

  
//Set the size properties. The annotation must be added to the page first.
  
circle.Height = 0.25f;
  circle.Width = 0.50f;

  
//Save annotations to an RDF file
  
rpt.Document.Save("C:\\MyAnnotations.rdf");
}

Remarks

You must add the annotation to the page before you can set the width of the annotation.

See Also