See Also

ControlCollection Class  | ControlCollection Members

Language

Visual Basic

C#

Show All

index
Index to which the control should be inserted.
value
Control to be inserted.
See Also Languages ActiveReports Send feedback to Data Dynamics

Insert Method

Inserts the control specified in the value parameter at the specified index.

[Visual Basic]
Public Sub Insert( _    ByVal index As Integer, _    ByVal value As ARControl _ )
[C#]
public void Insert(    int index,    ARControl value );

Parameters

index
Index to which the control should be inserted.
value
Control to be inserted.

Example

[C#] 

private void rptDataDynamics_ReportStart(object sender, System.EventArgs eArgs) 

    DataDynamics.ActiveReports.TextBox t = new DataDynamics.ActiveReports.TextBox(); 
    DataDynamics.ActiveReports.TextBox t2 = new DataDynamics.ActiveReports.TextBox(); 
    t.Text="Insert text here."; 
    t2.Text="Insert some more text here."; 
    t2.Left=1; 
    this.Sections[0].Controls.Add (t); 
    this.Sections[0].Controls.Insert(1,t2);  
}

[Visual Basic] 

Private Sub rptDD_ReportStart(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.ReportStart
    Dim t As New DataDynamics.ActiveReports.TextBox
    Dim t2 As New DataDynamics.ActiveReports.TextBox
    t.Text = "Insert text here."
    t2.Text = "Insert some more text here."
    t2.Left = 1
    Me.Sections(0).Controls.Add(t)
    Me.Sections(0).Controls.Insert(0, t2)
End Sub

See Also

ControlCollection Class  | ControlCollection Members

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.