Version

TabGroupScrolling Event

Cancelable event that occurs before an MdiTabGroup is scrolled.
Syntax
'Declaration
 
Public Event TabGroupScrolling As MdiTabGroupScrollingEventHandler
public event MdiTabGroupScrollingEventHandler TabGroupScrolling
Event Data

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

PropertyDescription
Cancel (Inherited from System.ComponentModel.CancelEventArgs) 
ScrollIncrement (Inherited from Infragistics.Win.UltraWinTabs.TabScrollingEventArgs) 
ScrollType (Inherited from Infragistics.Win.UltraWinTabs.TabScrollingEventArgs) 
TabGroup Returns the MdiTabGroup being scrolled
Remarks

The TabGroupScrolling is invoked when the tabs in an MdiTabGroup are about to scroll. This could be the result of clicking on a the ScrollButtons, invoking the MdiTabGroup.Scroll method, etc. The System.ComponentModel.CancelEventArgs.Cancel may be set to true to prevent the scroll operation.

Example
The following sample demonstrates how to use the information passed to the TabGroupScrolling 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_TabGroupScrolling(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinTabbedMdi.MdiTabGroupScrollingEventArgs) Handles ultraTabbedMdiManager1.TabGroupScrolling
    ' The 'TabGroupScrolling' event will occur when the 
    ' tabs within an MdiTabGroup are about to be scrolled.
    '

    ' The 'Cancel' parameter may be set to true to 
    ' prevent the scroll operation from occuring.
    '
    'e.Cancel = True

    Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder()

    sb.Append("TabGroupScrolling:")

    ' The 'TabGroup' returns the MdiTabGroup whose tabs
    ' are to be scrolled.
    sb.AppendFormat(" TabGroup = '{0}',", e.TabGroup)

    ' The 'ScrollType' parameter indicates if the user is 
    ' scrolling one tab, one page of tabs, etc.
    sb.AppendFormat(" ScrollType = {0}, ScrollIncrement= {1}", e.ScrollType, e.ScrollIncrement)

    System.Diagnostics.Debug.WriteLine(sb.ToString())
End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinTabs;
using Infragistics.Win.UltraWinTabbedMdi;

private void ultraTabbedMdiManager1_TabGroupScrolling(object sender, Infragistics.Win.UltraWinTabbedMdi.MdiTabGroupScrollingEventArgs e)
{
	// The 'TabGroupScrolling' event will occur when the 
	// tabs within an MdiTabGroup are about to be scrolled.
	//

	// The 'Cancel' parameter may be set to true to 
	// prevent the scroll operation from occuring.
	//
	//e.Cancel = true;

	System.Text.StringBuilder sb = new System.Text.StringBuilder();

	sb.Append("TabGroupScrolling:");

	// The 'TabGroup' returns the MdiTabGroup whose tabs
	// are to be scrolled.
	sb.AppendFormat(" TabGroup = '{0}',", e.TabGroup);

	// The 'ScrollType' parameter indicates if the user is 
	// scrolling one tab, one page of tabs, etc.
	sb.AppendFormat(" ScrollType = {0}, ScrollIncrement= {1}", e.ScrollType,  e.ScrollIncrement);

	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