Occurs when the
BodyBounds property changes.
Syntax
| JScript | |
|---|
In JScript, you can handle the events defined by another class, but you cannot define your own. |
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.
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 Basic | Copy 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