TabControl.SelectTab Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Makes the specified tab the current tab.
Overloads
SelectTab(String) |
Makes the tab with the specified name the current tab. |
SelectTab(TabPage) |
Makes the specified TabPage the current tab. |
SelectTab(Int32) |
Makes the tab with the specified index the current tab. |
SelectTab(String)
- Source:
- TabControl.cs
- Source:
- TabControl.cs
- Source:
- TabControl.cs
Makes the tab with the specified name the current tab.
public:
void SelectTab(System::String ^ tabPageName);
public void SelectTab (string tabPageName);
member this.SelectTab : string -> unit
Public Sub SelectTab (tabPageName As String)
Parameters
Exceptions
The tabPageName
argument is null
.
-or-
The tabPageName
argument does not match the Name property of any TabPage in the TabPages collection.
Remarks
Use this method to programmatically select a particular tab in a TabControl.
See also
Applies to
SelectTab(TabPage)
- Source:
- TabControl.cs
- Source:
- TabControl.cs
- Source:
- TabControl.cs
Makes the specified TabPage the current tab.
public:
void SelectTab(System::Windows::Forms::TabPage ^ tabPage);
public void SelectTab (System.Windows.Forms.TabPage tabPage);
member this.SelectTab : System.Windows.Forms.TabPage -> unit
Public Sub SelectTab (tabPage As TabPage)
Parameters
Exceptions
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.
The tabPage
argument is null
.
Remarks
Use this method to programmatically select a particular tab in a TabControl.
See also
Applies to
SelectTab(Int32)
- Source:
- TabControl.cs
- Source:
- TabControl.cs
- Source:
- TabControl.cs
Makes the tab with the specified index the current tab.
public:
void SelectTab(int index);
public void SelectTab (int index);
member this.SelectTab : int -> unit
Public Sub SelectTab (index As Integer)
Parameters
Exceptions
index
is less than 0 or greater than the number of TabPage controls in the TabPages collection minus 1.
Remarks
Use this method to programmatically select a particular tab in a TabControl.
See also
Applies to
.NET