TabControl.DeselectTab TabControl.DeselectTab TabControl.DeselectTab TabControl.DeselectTab Method

Definition

Makes the tab following the specified tab the current tab.

Overloads

DeselectTab(Int32) DeselectTab(Int32) DeselectTab(Int32) DeselectTab(Int32)

Makes the tab following the tab with the specified index the current tab.

DeselectTab(String) DeselectTab(String) DeselectTab(String) DeselectTab(String)

Makes the tab following the tab with the specified name the current tab.

DeselectTab(TabPage) DeselectTab(TabPage) DeselectTab(TabPage)

Makes the tab following the specified TabPage the current tab.

DeselectTab(Int32) DeselectTab(Int32) DeselectTab(Int32) DeselectTab(Int32)

Makes the tab following the tab with the specified index the current tab.

public:
 void DeselectTab(int index);
public void DeselectTab (int index);
member this.DeselectTab : int -> unit
Public Sub DeselectTab (index As Integer)

Parameters

index
Int32 Int32 Int32 Int32

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

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 deselect a particular tab in a TabControl. If there are at least two tabs in the control, the tab following the specified tab becomes the current tab. If the specified tab is the last tab in the control, the first tab becomes the current tab.

See also

DeselectTab(String) DeselectTab(String) DeselectTab(String) DeselectTab(String)

Makes the tab following the tab with the specified name the current tab.

public:
 void DeselectTab(System::String ^ tabPageName);
public void DeselectTab (string tabPageName);
member this.DeselectTab : string -> unit
Public Sub DeselectTab (tabPageName As String)

Parameters

tabPageName
String String String String

The Name of the tab to deselect.

Exceptions

tabPageName is null.

-or-

tabPageName does not match the Name property of any TabPage in the TabPages collection.

Remarks

Use this method to programmatically deselect a particular tab in a TabControl. If there are at least two tabs in the control, the tab following the specified tab becomes the current tab. If the specified tab is the last tab in the control, the first tab becomes the current tab.

See also

DeselectTab(TabPage) DeselectTab(TabPage) DeselectTab(TabPage)

Makes the tab following the specified TabPage the current tab.

public:
 void DeselectTab(System::Windows::Forms::TabPage ^ tabPage);
public void DeselectTab (System.Windows.Forms.TabPage tabPage);
member this.DeselectTab : System.Windows.Forms.TabPage -> unit

Parameters

tabPage
TabPage TabPage TabPage TabPage

The TabPage to deselect.

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.

Remarks

Use this method to programmatically deselect a particular tab in a TabControl. If there are at least two tabs in the control, the tab following the specified tab becomes the current tab. If the specified tab is the last tab in the control, the first tab becomes the current tab.

See also

Applies to