ActiveReports 6 Online Help
AddComponent(Section,ARControl,Int32) Method
Example 

The section to which the control will be added.
The control to add.
The index to which to add the control.
Adds an AR control to the section at the specified index.
Syntax
'Declaration
 
Public Overloads Function AddComponent( _
   ByVal section As Section, _
   ByVal control As ARControl, _
   ByVal index As Integer _
) As Boolean
public bool AddComponent( 
   Section section,
   ARControl control,
   int index
)

Parameters

section
The section to which the control will be added.
control
The control to add.
index
The index to which to add the control.

Return Value

True if a control is added to the section successfully; otherwise, false.
Remarks

This method returns false if:

You cannot add the control to the section if a control with the same name has already been added.

Example
Dim control As New TextBox
control.Name = "TextBox1"
control.Size = New SizeF(1.0F, 1.0F)
Me.arDesigner.AddComponent(Me.arDesigner.Report.Sections(0), control, 0)
TextBox control = new TextBox();
control.Name="TextBox1";
control.Size = new SizeF(1f,1f);
this.arDesigner.AddComponent(this.arDesigner.Report.Sections[0], control, 0);
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Designer Class
Designer Members
Overload List

Send Feedback