Version

GetNewExtent(MdiTabGroup) Method

Returns the extent for the specified MdiTabGroup in the TabGroups collection
Syntax
'Declaration
 
Public Overloads Function GetNewExtent( _
   ByVal tabGroup As MdiTabGroup _
) As Integer
public int GetNewExtent( 
   MdiTabGroup tabGroup
)

Parameters

tabGroup
MdiTabGroup whose new extent should be returned.

Return Value

An integer indicating the new extent for the MdiTabGroup at the specified index.
Example
The following sample demonstrates how to use the information passed to the TabGroupResizing event.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

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() );
}
Requirements

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

See Also