ICreate.Controls.Bars Send comments on this topic.
BodyBoundsChanged Event
See Also  Example
ICreate.Controls.Bars Namespace > CollapsingGroupPanel Class : BodyBoundsChanged Event






Occurs when the BodyBounds property changes.

Syntax

Visual Basic (Declaration) 
Public Event BodyBoundsChanged() As CollapsingGroupPanelBodyBoundsChangedEventHandler
Visual Basic (Usage)Copy Code
Dim instance As CollapsingGroupPanel
Dim handler As CollapsingGroupPanelBodyBoundsChangedEventHandler
 
AddHandler instance.BodyBoundsChanged, handler
C# 
public event CollapsingGroupPanelBodyBoundsChangedEventHandler BodyBoundsChanged()
Delphi 
public event BodyBoundsChanged: CollapsingGroupPanelBodyBoundsChangedEventHandler; 
JScript 
In JScript, you can handle the events defined by another class, but you cannot define your own.
Managed Extensions for C++ 
public: __event CollapsingGroupPanelBodyBoundsChangedEventHandler* BodyBoundsChanged();
C++/CLI 
public:
event CollapsingGroupPanelBodyBoundsChangedEventHandler^ BodyBoundsChanged();

Event Data

The event handler receives an argument of type CollapsingGroupPanelBodyBoundsChangedEventArgs containing data related to this event. The following CollapsingGroupPanelBodyBoundsChangedEventArgs properties provide information specific to this event.

PropertyDescription
Bounds Gets the new value of the BodyBounds property.

Example

This example shows how to use the BodyBoundsChanged event to ensure a Panel control coincides with the body of the CollapsingGroupPanel. This example assumes there is a CollapsingGroupPanel docked to fill its parent Form.
C#Copy Code
using System; 
using System.Drawing; 
using System.Windows.Forms; 
using ICreate.Controls.Bars; 
 
namespace ExamplesCollapsingGroupPanelCSharp 

    public partial class BodyBoundsChangedEventExample : Form 
    { 
        public BodyBoundsChangedEventExample() 
        { 
            InitializeComponent(); 
 
            bodyPanel = new Panel(); 
            bodyPanel.BackColor = Color.SkyBlue; 
            bodyPanel.Bounds = collapsingGroupPanel.BodyBounds; 
            collapsingGroupPanel.Controls.Add(bodyPanel); 
 
            collapsingGroupPanel.BodyBoundsChanged += new ICreate.Controls.Bars.CollapsingGroupPanelBodyBoundsChangedEventHandler(OnBodyBoundsChanged); 
        } 
 
        private void OnBodyBoundsChanged(object sender, CollapsingGroupPanelBodyBoundsChangedEventArgs args) 
        { 
            bodyPanel.Bounds = args.Bounds; 
        } 
 
        private Panel bodyPanel; 
    } 
}
Visual BasicCopy Code
Imports ICreate.Controls.Bars

Public Class BodyBoundsChangedEventExample

    Public Sub New()

        InitializeComponent()

        bodyPanel = New Panel()
        bodyPanel.BackColor = Color.SkyBlue
        bodyPanel.Bounds = CollapsingGroupPanel.BodyBounds
        CollapsingGroupPanel.Controls.Add(bodyPanel)

        AddHandler CollapsingGroupPanel.BodyBoundsChanged, AddressOf OnBodyBoundsChanged

    End Sub

    Private Sub OnBodyBoundsChanged(ByVal sender As Object, ByVal args As CollapsingGroupPanelBodyBoundsChangedEventArgs)
        bodyPanel.Bounds = args.Bounds
    End Sub

    Private bodyPanel As Panel

End Class

Requirements

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