See Also

ControlCollection Class  | ControlCollection Members

Language

Visual Basic

C#

Show All

control
The control to locate in the collection.
See Also Languages ActiveReports Send feedback to Data Dynamics

IndexOf Method

Retrieves the index of the specified control in the control collection.

[Visual Basic]
Public Function IndexOf( _    ByVal control As ARControl _ ) As Integer
[C#]
public int IndexOf(    ARControl control );

Parameters

control
The control to locate in the collection.

Return Type

A zero-based value that represents the position of the specified control in the collection.

Example

[C#] 

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

    DataDynamics.ActiveReports.TextBox t = new DataDynamics.ActiveReports.TextBox(); 
    t.Text="Insert text here."; 
    this.Sections[0].Controls.Add (t); 
    System.Windows.Forms.MessageBox.Show (this.Sections[0].Controls.IndexOf(t).ToString());  
}

[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
    t.Text = "Insert text here."
    Me.Sections(0).Controls.Add(t)
    MsgBox(Me.Sections(0).Controls.IndexOf(t))
End Sub

See Also

ControlCollection Class  | ControlCollection Members

 

 


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