TabControl.SelectTab Method (Int32)

 

Makes the tab with the specified index the current tab.

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

public void SelectTab(
	int index
)

Parameters

index
Type: System.Int32

The index in the TabPages collection of the tab to select.

Exception Condition
ArgumentOutOfRangeException

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

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

.NET Framework
Available since 2.0
Return to top
Show: