See Also

ToolsCollection Class  | ToolsCollection Members

Language

Visual Basic

C#

Show All

index
The indexed location within the collection to insert the new tool.
value
The Tool to insert.
See Also Languages ActiveReports.Viewer Send feedback to Data Dynamics

Insert Method

Inserts an existing toolbar tool in the toolbar tools collection at the specified location.

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

Parameters

index
The indexed location within the collection to insert the new tool.
value
The Tool to insert.

Example

[C#] 

// Remove the default printer button 
this.viewer1.Toolbar.Tools.RemoveAt(2); 
// Create And add the custom button 
DataDynamics.ActiveReports.Toolbar.Button btn = New DataDynamics.ActiveReports.Toolbar.Button(); 
btn.Caption = "MyPrint"; 
btn.ToolTip = "Custom Print Button"; 
btn.ImageIndex = 1; 
btn.ButtonStyle = DataDynamics.ActiveReports.Toolbar.ButtonStyle.TextAndIcon; 
btn.Id = 333; 
this.viewer1.Toolbar.Tools.Insert(2,btn);

[Visual Basic] 

' Remove the default print button
Me.Viewer1.Toolbar.Tools.RemoveAt(2)
' Create and add the custom button
Dim btn As New DataDynamics.ActiveReports.Toolbar.Button()
btn.Caption = "MyPrint"
btn.ToolTip = "Custom Print Button"
btn.ImageIndex = 1
btn.ButtonStyle = DataDynamics.ActiveReports.Toolbar.ButtonStyle.TextAndIcon
btn.Id = 333
Me.Viewer1.Toolbar.Tools.Insert(2, btn)

See Also

ToolsCollection Class  | ToolsCollection Members

 

 


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