See Also

ToolsCollection Class  | ToolsCollection Members

Language

Visual Basic

C#

Show All

value
The Tool to remove from the collection.
See Also Languages ActiveReports.Viewer Send feedback to Data Dynamics

Remove Method

Removes a given tool from the toolbar tools collection.

[Visual Basic]
Public Sub Remove( _    ByVal value As Tool _ )
[C#]
public void Remove(    Tool value );

Parameters

value
The Tool to remove from the collection.

Example

[C#] 

private void arv_Load(object sender, System.EventArgs e) 

    DataDynamics.ActiveReports.Toolbar.Tool[] arr = new DataDynamics.ActiveReports.Toolbar.Tool[2]; 
    DataDynamics.ActiveReports.Toolbar.Button b = new DataDynamics.ActiveReports.Toolbar.Button(); 
    b.ButtonStyle = DataDynamics.ActiveReports.Toolbar.ButtonStyle.Icon; 
    b.Enabled = true; 
    b.Id = 777; 
    b.ImageIndex = 0; 
    b.ToolTip = "Do not click here."; 
    b.Visible = true; 
 
    DataDynamics.ActiveReports.Toolbar.CheckButton c = new DataDynamics.ActiveReports.Toolbar.CheckButton(); 
    c.ButtonStyle = DataDynamics.ActiveReports.Toolbar.ButtonStyle.TextAndIcon; 
    c.Id = 888; 
    c.ImageIndex = 1; 
    c.ToolTip = "Click here."; 
 
    arr[0] = b; 
    arr[1] = c; 
 
    System.Windows.Forms.ImageList i = new ImageList(); 
    i.Images.Add(Image.FromFile("c:\\icons\\Zero Suit.ico")); 
    i.Images.Add(Image.FromFile("c:\\icons\\The Other Band.ico")); 
 
    DataDynamics.ActiveReports.Toolbar.Toolbar t = new DataDynamics.ActiveReports.Toolbar.Toolbar(); 
    t.DisplayToolTips = true; 
    t.Images = i; 
    t.Parent = arv.Parent; 
    t.Tools.AddRange(arr); 
    t.Wrappable = true; 
     
    if (t.Tools.Contains(b)) 
    { 
        t.Tools.Remove(c); 
    } 
 
    rptDD rpt = new rptDD(); 
    rpt.Run(); 
    arv.Document = rpt.Document; 
}

[Visual Basic] 

Private Sub arv_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles arv.Load
    Dim arr(1) As DataDynamics.ActiveReports.Toolbar.Tool
    Dim b As New DataDynamics.ActiveReports.Toolbar.Button
    b.ButtonStyle = DataDynamics.ActiveReports.Toolbar.ButtonStyle.Icon
    b.Enabled = True
    b.Id = 777
    b.ImageIndex = 0
    b.ToolTip = "Do not click here."
    b.Visible = True

    Dim c As New DataDynamics.ActiveReports.Toolbar.CheckButton
    c.ButtonStyle = DataDynamics.ActiveReports.Toolbar.ButtonStyle.TextAndIcon
    c.Id = 888
    c.ImageIndex = 1
    c.ToolTip = "Click here."

    arr(0) = b
    arr(1) = c

    Dim i As New System.Windows.Forms.ImageList
    i.Images.Add(Image.FromFile("c:\icons\Zero Suit.ico"))
    i.Images.Add(Image.FromFile("c:\icons\The Other Band.ico"))

    Dim t As New DataDynamics.ActiveReports.Toolbar.Toolbar
    t.DisplayToolTips = True
    t.Images = i
    t.Parent = arv.Parent
    t.Tools.AddRange(arr)
    t.Wrappable = True

    If t.Tools.Contains(b) Then
        t.Tools.Remove(c)
    End If

    Dim rpt As New rptDD
    rpt.Run()
    arv.Document = rpt.Document
End Sub

See Also

ToolsCollection Class  | ToolsCollection Members

 

 


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