ActiveReports.Viewer6 Send comments on this topic.
Button Class
See Also  Members   Example 
ActiveReports.Viewer6 Assembly > DataDynamics.ActiveReports.Toolbar Namespace : Button Class

Displays a standard push button on the toolbar.

Syntax

Visual Basic (Declaration) 
Public Class Button 
   Inherits Tool
C# 
public class Button : Tool 

Example

C#Copy Code
// 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 BasicCopy Code
' 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)

Remarks

Note:  In order to enable the Viewer's Copy button, you will need to add references to the RtfExport.dll and the TextExport.dll.

Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         DataDynamics.ActiveReports.Toolbar.Tool
            DataDynamics.ActiveReports.Toolbar.Button
               DataDynamics.ActiveReports.Toolbar.CheckButton

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also