ActiveReports Developer 7
Alpha Property
See Also  Example
GrapeCity.ActiveReports.Document.v7 Assembly > GrapeCity.ActiveReports.Document.Section.Annotations Namespace > Annotation Class : Alpha Property

Glossary Item Box

Gets or sets the opacity of the Annotation object.

Syntax

Visual Basic (Declaration) 
Public Overridable Property Alpha As System.Integer
C# 
public virtual System.int Alpha {get; set;}

Remarks

Acceptable values are 0 to 255.

Example

C#Copy Code
using GrapeCity.ActiveReports.Document.Section.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;
   circle.Alpha = 150; 
   
   //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"); 
}
Visual BasicCopy Code
Private rpt As New rptAnnotations()
Private Sub AddAnnotations()
'Run the report first 
rpt.Run()

'Assign the viewer 
Me.viewer1.Document = rpt.Document

'Create an annotation and assign property values 
Dim circle As New AnnotationCircle()
circle.Color = System.Drawing.Color.GreenYellow
circle.Border.Color = System.Drawing.Color.Chartreuse
circle.Alpha = 150

'Add the annotation 
circle.Attach(1, 1)
'screen location 
Me.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.5F

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

End Sub

See Also