ActiveReports.Viewer6 Assembly > DataDynamics.ActiveReports.Toolbar Namespace > Tool Class : Size Property |
Gets the size of the tool in inches.
private void Form1_Load(object sender, System.EventArgs e) { // 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.Enabled = true; System.Drawing.Size s = new Size(20,10); btn.Size = s; btn.ToolTip = "Custom Print Button"; btn.Visible = true; btn.ImageIndex = 1; btn.ButtonStyle = DataDynamics.ActiveReports.Toolbar.ButtonStyle.TextAndIcon; btn.Id = 333; this.viewer1.Toolbar.Tools.Insert(2,btn); ActiveReport1 rpt = new ActiveReport1(); rpt.Run(); this.viewer1.Document=rpt.Document; }
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' 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.Enabled = True Dim s As New System.Drawing.Size(3, 5) btn.Size = s btn.ToolTip = "Custom Print Button" btn.Visible = True btn.ImageIndex = 1 btn.ButtonStyle = DataDynamics.ActiveReports.Toolbar.ButtonStyle.TextAndIcon btn.Id = 333 Me.Viewer1.Toolbar.Tools.Insert(2, btn) Dim rpt As New ActiveReport1 rpt.Run() Me.Viewer1.Document = rpt.Document End Sub
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