ActiveReports 8
LayoutChangedArgs Class
Members  Example  See Also 
GrapeCity.ActiveReports.Design.Win.v8 Assembly > GrapeCity.ActiveReports.Design Namespace : LayoutChangedArgs Class

Glossary Item Box

The LayoutChangedArgs class provides data required for the LayoutChanged event.

Object Model

LayoutChangedArgs Class

Syntax

Visual Basic (Declaration) 
Public Class LayoutChangedArgs 
   Inherits System.EventArgs
C# 
public class LayoutChangedArgs : System.EventArgs 

Example

C#Copy Code
// ardMain_LayoutChanged - runs when a control/section in the layout is added/deleted/moved

private void ardMain_LayoutChanged(object sender, GrapeCity.ActiveReports.Design.LayoutChangedArgs e)
{
    if(e.Type == GrapeCity.ActiveReports.Design.LayoutChangeType.ControlAdd)  //Control Added
    {
        this._controlAdded = true;
        ResetToolbox();
        tbToolbox.Buttons[0].Pushed = true;
    }
    else
    {
        this._controlAdded = false;
    }
            
    if(e.Type == GrapeCity.ActiveReports.Design.LayoutChangeType.ControlDelete)  //Control Deleted
    {
        this._controlDeleted = true;
    }
    else
    {
        this._controlDeleted = false;
    }

    if(e.Type == GrapeCity.ActiveReports.Design.LayoutChangeType.SectionAdd)  //Section Added
    {
        this._sectionAdded = true;
    }
    else
    {
        this._sectionAdded = false;
    }

    if(e.Type == GrapeCity.ActiveReports.Design.LayoutChangeType.SectionDelete)  //Section Deleted
    {
        this._sectionDeleted = true;
    }
    else
    {
        this._sectionDeleted = false;
    }
}
Visual BasicCopy Code
'ardMain_LayoutChanged - runs when a control/section in the layout is added/deleted/moved
Private Sub ardMain_LayoutChanged(ByVal sender As Object, ByVal e As GrapeCity.ActiveReports.Design.LayoutChangedArgs) Handles ardMain.LayoutChanged
    If e.Type = GrapeCity.ActiveReports.Design.LayoutChangeType.ControlAdd Then 'Control Added
        Me._controlAdded = True
        ResetToolbox()
        tbToolbox.Buttons(0).Pushed = True
    Else
        Me._controlAdded = False
    End If

    If e.Type = GrapeCity.ActiveReports.Design.LayoutChangeType.ControlDelete Then 'Control Deleted
        Me._controlDeleted = True
    Else
        Me._controlDeleted = False
    End If

    If e.Type = GrapeCity.ActiveReports.Design.LayoutChangeType.SectionAdd Then 'Section Added
        Me._sectionAdded = True
    Else
        Me._sectionAdded = False
    End If

    If e.Type = GrapeCity.ActiveReports.Design.LayoutChangeType.SectionDelete Then 'Section Deleted
        Me._sectionDeleted = True
    Else
        Me._sectionDeleted = False
    End If
End Sub 'ardMain_LayoutChanged

Inheritance Hierarchy

System.Object
   System.EventArgs
      GrapeCity.ActiveReports.Design.LayoutChangedArgs

Requirements

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

See Also