See Also

Toolbar Class  | Toolbar Members

Language

Visual Basic

C#

Show All

See Also Languages ActiveReports.Viewer Send feedback to Data Dynamics

ToolClick Event

Occurs when a tool on the toolbar is clicked.

[Visual Basic]
Public Event ToolClick() As ToolClickEventHandler
[C#]
public event ToolClickEventHandler ToolClick();

Event Data

The event handler receives an argument of type ToolClickEventArgs containing data related to this event. The following ToolClickEventArgs properties provide information specific to this event.

PropertyDescription
Tool Gets or sets the tool that was clicked.

Example

[C#] 

private void arViewer_ToolClick(object sender, DataDynamics.ActiveReports.Toolbar.ToolClickEventArgs e) 

    //Add code to run when new buttons are clicked 
    try 
    { 
        switch(e.Tool.Id) 
        { 
            case 5001: //Save button 
                this.SaveDocument(); 
                break; 
            case 5002: //Export button 
                this.ExportDocument(); 
                break; 
        } 
    } 
    catch(System.IO.IOException exp) 
    { 
        MessageBox.Show(exp.ToString()); 
    } 
}

[Visual Basic] 

Private Sub arViewer_ToolClick(ByVal sender As Object, ByVal e As Toolbar.ToolClickEventArgs) Handles arvMain.ToolClick
    'Add code to run when new buttons are clicked
    Try
        Select Case e.Tool.Id
            Case 5001 'Save button
                Me.SaveDocument()
            Case 5002 'Export button
                Me.ExportDocument()
        End Select
    Catch exp As System.IO.IOException
        MessageBox.Show(exp.ToString())
    End Try
End Sub 'arViewer_ToolClick

See Also

Toolbar Class  | Toolbar Members

 

 


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