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