'Declaration Public Event TabGroupResizing As MdiTabGroupResizingEventHandler
public event MdiTabGroupResizingEventHandler TabGroupResizing
The event handler receives an argument of type MdiTabGroupResizingEventArgs containing data related to this event. The following MdiTabGroupResizingEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Cancel (Inherited from System.ComponentModel.CancelEventArgs) | |
TabGroups | Returns a collection of MdiTabGroup objects that are being resized. |
The TabGroupResizing is invoked when one or more MdiTabGroup objects are about to have their Extent modified. This could be as a result of a splitter drag (SplitterDragging), resizing the mdi client, creating a new MdiTabGroup, removing an existing MdiTabGroup or explicitly setting the Extent or ClientExtent.
The sum of the extents must always equal the extent of the client area of the mdi client. Whether they must equal the width or height is dependant upon the Orientation. If the event is cancelled, the sum of the extents is calculated. If the sum does not equal the extent of the mdi client area, the extents are adjusted.
Note: Setting the Extent will implicitly cancel the event and the tab groups extents will be verified as described above.
Imports Infragistics.Win Imports Infragistics.Win.UltraWinTabs Imports Infragistics.Win.UltraWinTabbedMdi Private Sub ultraTabbedMdiManager1_TabGroupResizing(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinTabbedMdi.MdiTabGroupResizingEventArgs) Handles ultraTabbedMdiManager1.TabGroupResizing ' The 'TabGroupResizing' event is invoked before the ' Extent of one or more MdiTabGroups is modified. ' ' The 'Cancel' parameter may be set to true to ' prevent the resize operation. Note, however that ' the sum of the extents must match the relative ' client area of the mdi client so if the resize operation ' came as a result of resizing the mdi client for example, ' the sizes must still be updated. ' 'e.Cancel = True Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder() sb.Append("TabGroupResizing:") ' The 'GetNewExtents' method will return an array of ' integers indicating the proposed new size of the ' the 'TabGroups'. 'Dim newSizes As Integer() = e.GetNewExtents() Dim i As Integer For i = 0 To e.TabGroups.Count - 1 Step +1 ' The 'TabGroups' parameter returns a collection ' of one or more MdiTabGroup objects that will ' have its Extent modified. ' Dim tabGroup As MdiTabGroup = e.TabGroups(i) ' The 'GetNewExtent' method will return the ' proposed extent for the specified tab group. ' Dim NewExtent As Integer = e.GetNewExtent(tabGroup) sb.AppendFormat(" [#{3}] TabGroup ({0}) being resized from {1} to {2};", tabGroup, tabGroup.Extent, NewExtent, i) Next System.Diagnostics.Debug.WriteLine(sb.ToString()) End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinTabs; using Infragistics.Win.UltraWinTabbedMdi; private void ultraTabbedMdiManager1_TabGroupResizing(object sender, Infragistics.Win.UltraWinTabbedMdi.MdiTabGroupResizingEventArgs e) { // The 'TabGroupResizing' event is invoked before the // Extent of one or more MdiTabGroups is modified. // // The 'Cancel' parameter may be set to true to // prevent the resize operation. Note, however that // the sum of the extents must match the relative // client area of the mdi client so if the resize operation // came as a result of resizing the mdi client for example, // the sizes must still be updated. // // e.Cancel = true; System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("TabGroupResizing:"); // The 'GetNewExtents' method will return an array of // integers indicating the proposed new size of the // the 'TabGroups'. //int[] newSizes = e.GetNewExtents(); for(int i = 0; i < e.TabGroups.Count; i++) { // The 'TabGroups' parameter returns a collection // of one or more MdiTabGroup objects that will // have its Extent modified. // MdiTabGroup tabGroup = e.TabGroups[i]; // The 'GetNewExtent' method will return the // proposed extent for the specified tab group. // int newExtent = e.GetNewExtent(tabGroup); sb.AppendFormat( " [#{3}] TabGroup ({0}) being resized from {1} to {2};", tabGroup, tabGroup.Extent, newExtent, i); } System.Diagnostics.Debug.WriteLine( sb.ToString() ); }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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