ActiveReports.Viewer3 Request technical support
Enabled Property
See Also  Example


Gets or sets a value indicating whether the tool is enabled.

Syntax

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

Return Value

True if the tool is enabled; otherwise, False. The default value is True.

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