ActiveReports.Viewer3 Request technical support
Size Property
See Also  Example


Gets the size of the tool in inches.

Syntax

Visual Basic (Declaration) 
Public Property Size As Size
Visual Basic (Usage)Copy Code
Dim instance As Tool
Dim value As Size
 
instance.Size = value
 
value = instance.Size
C# 
public Size Size {get; set;}

Return Value

System.Drawing.Size in inches.

Example

C#Copy Code
       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;        
       }
Visual BasicCopy Code
    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

See Also