ActiveReports Developer 7
Add Method
See Also  Example
GrapeCity.ActiveReports.v7 Assembly > GrapeCity.ActiveReports.SectionReportModel Namespace > ControlCollection Class : Add Method

control
The ARControl to add to the collection.

Glossary Item Box

Adds the specified control to the control collection.

Syntax

Visual Basic (Declaration) 
Public Sub Add( _
   ByVal control As ARControl _
) 
C# 
public void Add( 
   ARControl control
)

Parameters

control
The ARControl to add to the collection.

Remarks

The Add method adds the control to the end of the collection.

Example

C#Copy Code
private void SectionReport1_ReportStart(object sender, System.EventArgs eArgs)
{
    GrapeCity.ActiveReports.SectionReportModel.TextBox t = new GrapeCity.ActiveReports.SectionReportModel.TextBox();
    t.Text="Insert text here.";
    this.Sections[0].Controls.Add (t);
}
Visual BasicCopy Code
Private Sub SectionReport1_ReportStart(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.ReportStart
    Dim t As New GrapeCity.ActiveReports.SectionReportModel.TextBox
    t.Text = "Insert text here."
    Me.Sections(0).Controls.Add(t)
End Sub

See Also

Reference

ControlCollection Class
ControlCollection Members
ActiveReports6~GrapeCity.ActiveReports.ControlCollection~AddRange