TabControl.SelectTab Method (TabPage)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Makes the specified TabPage the current tab.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

member SelectTab : 
        tabPage:TabPage -> unit

Parameters

tabPage
Type: System.Windows.Forms.TabPage

The TabPage to select.

Exception Condition
ArgumentOutOfRangeException

index is less than 0 or greater than the number of TabPage controls in the TabPages collection minus 1.

-or-

tabPage is not in the TabPages collection.

ArgumentNullException

tabPage is null.

Use this method to programmatically select a particular tab in a TabControl.

.NET Framework
Available since 2.0
Return to top
Show: