Version

TabFromPoint Method

Returns the Tab under the supplied point (in client coordinates) or null if no tab exists under the point.
Syntax
'Declaration
 
Public Function TabFromPoint( _
   ByVal point As Point _
) As UltraTab
public UltraTab TabFromPoint( 
   Point point
)

Parameters

point
The point in client coordinates.
Example
The following sample code illustrates how to call the TabFromPoint method.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinTabs
Imports Infragistics.Win.UltraWinTabControl


Private Sub ultraTabControl1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ultraTabControl1.MouseDown

    ' The TabFromPoint method takes a point in client
    ' coordinates and returns the tab under that point 
    ' or Nothing if the point is not over a tab
    Dim tab As UltraTab = Me.ultraTabControl1.TabFromPoint(New Point(e.X, e.Y))

    If Not tab Is Nothing Then

        Debug.WriteLine("Mouse down on tab '" + tab.Text + "'")

    End If

End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinTabs;
using Infragistics.Win.UltraWinTabControl;

private void ultraTabControl1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
	// The TabFromPoint method takes a point in client
	// coordinates and returns the tab under that point 
	// or null if the point is not over a tab
	UltraTab tab = this.ultraTabControl1.TabFromPoint( new Point( e.X, e.Y ) );

	if ( tab != null )
		Debug.WriteLine("Mouse down on tab '" + tab.Text + "'" );
}
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