# TabControl

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

* [Control](https://docs.wisej.com/api/wisej.web/general/control)
  * [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol)

Manages a related set of [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) pages.

{% tabs %}
{% tab title="C#" %}

```csharp
public class TabControl : Control
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class TabControl
    Inherits Control
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) TabControl()

Initializes a new instance of the [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol) class.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) TabControl(onSelectedIndexChanged)

Initializes a new instance of the [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol) class with the specified initial settings.

| Name                       | Type                                                                                | Description                                                                           |
| -------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| **onSelectedIndexChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | An Action delegate to handle the [SelectedIndexChanged](#selectedindexchanged) event. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) TabControl(tabPages, onSelectedIndexChanged)

Initializes a new instance of the [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol) class with the specified initial settings.

| Name                       | Type                                                                                        | Description                                                                                                                                                                                              |
| -------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **tabPages**               | [TabPage\[\]](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) | An array of [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) objects to be added to the [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol). |
| **onSelectedIndexChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2)         | An Action delegate to handle the [SelectedIndexChanged](#selectedindexchanged) event.                                                                                                                    |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) TabControl(location, size, onSelectedIndexChanged)

Initializes a new instance of the [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol) class with the specified initial settings.

| Name                       | Type                                                                                | Description                                                                           |
| -------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| **location**               | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point)                 | The location of the TabControl on its parent control.                                 |
| **size**                   | [Size](https://docs.microsoft.com/dotnet/api/system.drawing.size)                   | The size of the TabControl.                                                           |
| **onSelectedIndexChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2) | An Action delegate to handle the [SelectedIndexChanged](#selectedindexchanged) event. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) TabControl(location, size, tabPages, onSelectedIndexChanged)

Initializes a new instance of the [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol) class with the specified initial settings.

| Name                       | Type                                                                                        | Description                                                                                                                                                                                              |
| -------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **location**               | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point)                         | The location of the TabControl on its parent control.                                                                                                                                                    |
| **size**                   | [Size](https://docs.microsoft.com/dotnet/api/system.drawing.size)                           | The size of the TabControl.                                                                                                                                                                              |
| **tabPages**               | [TabPage\[\]](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) | An array of [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) objects to be added to the [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol). |
| **onSelectedIndexChanged** | [Action\<Object, EventArgs>](https://docs.microsoft.com/dotnet/api/system.action-2)         | An Action delegate to handle the [SelectedIndexChanged](#selectedindexchanged) event.                                                                                                                    |

## Properties

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Alignment

[TabAlignment](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabalignment): Returns or sets the area of the control (for example, along the top) where the tabs are aligned.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) AllowUserToMoveTabs

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the user can change the position of a tab button by dragging it. (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) AutoActivateFirstChild

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets the option to automatically activate the first focusable control of the [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) when the [SelectedTab](#selectedtab) is changed.<mark style="color:blue;background-color:green;">Since 3.5.4</mark> (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) BorderStyle

[BorderStyle](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.borderstyle): Indicates the border style for the control. (Default: `Solid`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Display

[Display](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.display): Returns or sets the [Display](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.display) mode of the control to determine whether to display the icon, the text or both. (Default: `Both`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) DisplayRectangle

[Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle): Returns the display area of the control's tab pages.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ImageList

[ImageList](https://docs.wisej.com/api/wisej.web/content/imagelist): Returns or sets the images to display on the control's tabs. (Default: `null`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ItemSize

[Size](https://docs.microsoft.com/dotnet/api/system.drawing.size): Returns or sets the fixed size of the tab buttons. The default value is [Empty](https://docs.microsoft.com/dotnet/api/system.drawing.size.empty) to use the itemSize set in the current theme or auto sizing.

When set to [Empty](https://docs.microsoft.com/dotnet/api/system.drawing.size.empty) (default) it uses the itemSize set in the theme. You can also set only the width or the height and leave the other value set to 0 to use the value in the current theme or auto sizing.\
The width (or height when [Alignment](#alignment) is [Left](https://docs.wisej.com/api/wisej.web/containers/wisej.web.tabalignment#fields) or [Right](https://docs.wisej.com/api/wisej.web/containers/wisej.web.tabalignment#fields)) is applied when the value [SizeMode](#sizemode) is [Fixed](https://docs.wisej.com/api/wisej.web/containers/wisej.web.tabsizemode#fields) or [Center](https://docs.wisej.com/api/wisej.web/containers/wisej.web.tabsizemode#fields).\
The height (or width when [Alignment](#alignment) is [Top](https://docs.wisej.com/api/wisej.web/containers/wisej.web.tabalignment#fields) or [Bottom](https://docs.wisej.com/api/wisej.web/containers/wisej.web.tabalignment#fields)) is applied always.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Orientation

[Orientation](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.orientation): Returns or sets a value indicating the horizontal or vertical orientation of the [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol) tabs.

The default value is Orientation.Horizontal.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) RowCount

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns the number of rows that are currently being displayed in the control's tab strip. (Default: `1`)

Tab rows are not currently supported in Wisej.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ScrollStep

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the number of pixels to scroll when the scroll buttons are pressed. (Default: `15`)

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The value is less than 1 or greater than 500.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SelectedIndex

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the index of the currently selected tab page. (Default: `-1`)

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The value is less than -1.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SelectedTab

[TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage): Returns or sets the currently selected tab page. (Default: `null`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ShowToolTips

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether a tab's ToolTip is shown when the mouse passes over the tab. (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ShowVisibilityMenu

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the tab visibility menu button is visible. (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SizeMode

[TabSizeMode](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabsizemode): Returns or sets whether the tab buttons should fill the control's size, or placed in the center, or use the size set in [ItemSize](#itemsize).

The default value is TabSizeMode.Normal.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) TabCount

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Gets the number of tabs in the tab strip. (Default: `0`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) TabPages

[TabPageCollection](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontrol.tabpagecollection): Returns the collection of tab pages in this tab control.

Default value is an empty [TabPageCollection](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontrol.tabpagecollection)

## Methods

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) CreateControlsInstance()

This member overrides [CreateControlsInstance](https://docs.wisej.com/api/general/control#createcontrolsinstance).

**Returns:** [ControlCollection](https://docs.wisej.com/api/wisej.web/general/control/wisej.web.control.controlcollection). A new instance of [ControlCollection](https://docs.wisej.com/api/wisej.web/general/control/wisej.web.control.controlcollection) assigned to the control.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) DeselectTab(index)

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

| Parameter | Type                                                        | Description                                                               |
| --------- | ----------------------------------------------------------- | ------------------------------------------------------------------------- |
| **index** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The index in the [TabPages](#tabpages) collection of the tab to deselect. |

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)*index* is less than 0 or greater than the number of [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) controls in the [TabPages](#tabpages) collection minus 1.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) DeselectTab(tabPage)

Makes the tab following the specified [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) the current tab.

| Parameter   | Type                                                                                    | Description                                                                                              |
| ----------- | --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| **tabPage** | [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) | The [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) to deselect. |

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception)*tabPage* is null.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) DeselectTab(tabPageName)

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

| Parameter       | Type                                                          | Description                                                                         |
| --------------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| **tabPageName** | [String](https://docs.microsoft.com/dotnet/api/system.string) | The [Name](https://docs.wisej.com/api/general/control#name) of the tab to deselect. |

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception)*tabPageName* is null; or *tabPageName* does not match the [Name](https://docs.wisej.com/api/general/control#name) property of any [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) in the [TabPages](#tabpages) collection.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) FocusFirstChild()

Activates the first eligible child control in the tab page.<mark style="color:blue;background-color:green;">Since 3.5.4</mark>

Invoked when the [SelectedTab](#selectedtab) is changed and the property [AutoActivateFirstChild](#autoactivatefirstchild) is true.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) GetControl(index)

Returns the [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) control at the specified location.

| Parameter | Type                                                        | Description                                                                                                      |
| --------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| **index** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The index of the [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) to get. |

**Returns:** [Control](https://docs.wisej.com/api/wisej.web/general/control). The [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) at the specified location.

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)*index* is less than 0 or greater than the number of [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) controls in the [TabPages](#tabpages) collection minus 1.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) GetItems()

Returns an array of [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) controls that belong to the [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol) control.

**Returns:** [Object\[\]](https://docs.microsoft.com/dotnet/api/system.object). An array of [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) controls that belong to the [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) GetTabRect(index)

Returns the bounding rectangle for the tab button of the [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) at the specified *index* in this [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol) control.

| Parameter | Type                                                        | Description                                                                                          |
| --------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **index** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The zero-based index of the tab page for which to retrieve the bounding rectangle of the tab button. |

**Returns:** [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle). A [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) that represents the bounds of the specified tab.

Bounding rectangles for the tab buttons are received from the client and are updated asynchronously. If the application adds a tab page, or changes any property that causes the tab button to be resized (orientation, sizing, text, alignment, etc.) it cannot immediately after retrieve the new bounds.\
When the tab rectangles are updated, the [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol) will fire the [StyleChanged](https://docs.wisej.com/api/general/control#stylechanged) event to inform the application that the bounding rectangles have been updated.\
In alternative, you can use the [GetTabRect](#gettabrect-index) and [GetTabRectAsync](#gettabrectasync-index) overloads to query the client and receive the new bounding rectangle for the request tab page.\
Bounding rectangles are always empty until the [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol) has been rendered on the client.**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The index is less than zero; or the index is greater than or equal to [TabCount](#tabcount).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) GetTabRect(index, callback)

Retrieves the bounding rectangle for the tab button of the [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) at the specified *index* in this [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol) control.

| Parameter    | Type                                                                        | Description                                                                                          |
| ------------ | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **index**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | The zero-based index of the tab page for which to retrieve the bounding rectangle of the tab button. |
| **callback** | [Action\<Rectangle>](https://docs.microsoft.com/dotnet/api/system.action-1) | Callback method that will receive the bounding rectangle for the request tab button.                 |

Bounding rectangles are always empty until the [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol) has been rendered on the client.**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The index is less than zero; or the index is greater than or equal to [Count](https://docs.wisej.com/api/wisej.web/containers/wisej.web.tabcontrol.tabpagecollection#count).
* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception)\
  The callback method is null.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) GetTabRectAsync(index)

Retrieves the bounding rectangle for the tab button of the [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) at the specified *index* in this [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol) control.

| Parameter | Type                                                        | Description                                                                                          |
| --------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **index** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The zero-based index of the tab page for which to retrieve the bounding rectangle of the tab button. |

**Returns:** [Task\<Rectangle>](https://docs.microsoft.com/dotnet/api/system.threading.tasks.task-1).

Bounding rectangles are always empty until the [TabControl](https://docs.wisej.com/api/wisej.web/containers/tabcontrol) has been rendered on the client.**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)\
  The index is less than zero; or the index is greater than or equal to [Count](https://docs.wisej.com/api/wisej.web/containers/wisej.web.tabcontrol.tabpagecollection#count).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) GetToolTipText(item)

Returns the ToolTip for the specified [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage).

| Parameter | Type                                                          | Description                                                                                                                |
| --------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| **item**  | [Object](https://docs.microsoft.com/dotnet/api/system.object) | The [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) that owns the desired ToolTip. |

**Returns:** [String](https://docs.microsoft.com/dotnet/api/system.string). The ToolTip text.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) IsInputKey(keyData)

Determines whether the specified key is a regular input key or a special key that requires preprocessing.

| Parameter   | Type                                                                     | Description                                                                                 |
| ----------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- |
| **keyData** | [Keys](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.keys) | One of the [Keys](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.keys) values. |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). true if the specified key is a regular input key; otherwise, false.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnControlAdded(e)

Fires the [ControlAdded](https://docs.wisej.com/api/general/control#controladded) event.

| Parameter | Type                                                                                                | Description |
| --------- | --------------------------------------------------------------------------------------------------- | ----------- |
| **e**     | [ControlEventArgs](https://docs.wisej.com/api/wisej.web/general/control/wisej.web.controleventargs) |             |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnControlCreated(e)

Fires the [ControlCreated](https://docs.wisej.com/api/general/control#controlcreated) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnDeselected(e)

Fires the [Deselected](#deselected) event and the [Leave](https://docs.wisej.com/api/general/control#leave) event of the currently active [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage).

| Parameter | Type                                                                                                            | Description                                                                                                                                     |
| --------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TabControlEventArgs](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventargs) | A [TabControlEventArgs](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnDeselecting(e)

Fires the [Deselecting](#deselecting) event.

| Parameter | Type                                                                                                                        | Description                                                                                                                                                 |
| --------- | --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TabControlCancelEventArgs](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontrolcanceleventargs) | A [TabControlCancelEventArgs](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontrolcanceleventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnEnter(e)

Fires the [Enter](https://docs.wisej.com/api/general/control#enter) event of the currently active [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage).

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnLeave(e)

Fires the [Leave](https://docs.wisej.com/api/general/control#leave) event of the currently active [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage).

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnScrollStepChanged(e)

Fires the [ScrollStepChanged](#scrollstepchanged) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnSelected(e)

Fires the [Selected](#selected) event and the [Enter](https://docs.wisej.com/api/general/control#enter) event of the currently active [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage).

| Parameter | Type                                                                                                            | Description                                                                                                                                     |
| --------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TabControlEventArgs](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventargs) | A [TabControlEventArgs](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnSelectedIndexChanged(e)

Fires the [SelectedIndexChanged](#selectedindexchanged) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnSelecting(e)

Fires the [Selecting](#selecting) event.

| Parameter | Type                                                                                                                        | Description                                                                                                                                                 |
| --------- | --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TabControlCancelEventArgs](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontrolcanceleventargs) | A [TabControlCancelEventArgs](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontrolcanceleventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnSizeChanged(e)

Fires the [SizeChanged](https://docs.wisej.com/api/general/control#sizechanged) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnTabClosed(e)

Fires the [TabClosed](#tabclosed) event.

| Parameter | Type                                                                                                            | Description                                                                                                                                     |
| --------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TabControlEventArgs](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventargs) | A [TabControlEventArgs](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnTabClosing(e)

Fires the [TabClosing](#tabclosing) event.

| Parameter | Type                                                                                                                        | Description                                                                                                                                                 |
| --------- | --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TabControlCancelEventArgs](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontrolcanceleventargs) | A [TabControlCancelEventArgs](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontrolcanceleventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnTabMoved(e)

Fires the [TabMoved](#tabmoved) event.

| Parameter | Type                                                                                                            | Description                                                                                                                                            |
| --------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **e**     | [TabControlEventArgs](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventargs) | A [TabControlEventArgs](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventargs) object that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnTabVisibilityChanged(e)

Fires the [TabVisibilityChanged](#tabvisibilitychanged) event.

| Parameter | Type                                                                                                            | Description                                                                                                                                     |
| --------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [TabControlEventArgs](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventargs) | A [TabControlEventArgs](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnWebEvent(e)

Processes the event from the client.

| Parameter | Type                                                                           | Description      |
| --------- | ------------------------------------------------------------------------------ | ---------------- |
| **e**     | [WisejEventArgs](https://docs.wisej.com/api/wisej.core/general/wisejeventargs) | Event arguments. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnWebRender(config)

Renders the client component.

| Parameter  | Type                                                          | Description                   |
| ---------- | ------------------------------------------------------------- | ----------------------------- |
| **config** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic configuration object. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnWebUpdate(state)

Updates the client component using the state information.

| Parameter | Type                                                          | Description           |
| --------- | ------------------------------------------------------------- | --------------------- |
| **state** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic state object. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) RemoveAll()

Removes all the tab pages and additional controls from this tab control.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SelectTab(index)

Makes the tab with the specified index the current tab.

| Parameter | Type                                                        | Description                                                             |
| --------- | ----------------------------------------------------------- | ----------------------------------------------------------------------- |
| **index** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The index in the [TabPages](#tabpages) collection of the tab to select. |

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception)*index* is less than 0 or greater than the number of [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) controls in the [TabPages](#tabpages) collection minus 1.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SelectTab(tabPage)

Makes the specified [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) the current tab.

| Parameter   | Type                                                                                    | Description                                                                                            |
| ----------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| **tabPage** | [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) | The [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) to select. |

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception)*tabPage* is null.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SelectTab(tabPageName)

Makes the tab with the specified name the current tab.

| Parameter       | Type                                                          | Description                                                                       |
| --------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| **tabPageName** | [String](https://docs.microsoft.com/dotnet/api/system.string) | The [Name](https://docs.wisej.com/api/general/control#name) of the tab to select. |

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception)*tabPageName* is null; or *tabPageName* does not match the [Name](https://docs.wisej.com/api/general/control#name) property of any [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) in the [TabPages](#tabpages) collection.

## Events

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Deselected

[TabControlEventHandler](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventhandler) Fired when a tab is deselected.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Deselecting

[TabControlCancelEventHandler](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontrolcanceleventhandler) Occurs before a tab is deselected, enabling a handler to cancel the tab change.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ScrollStepChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the value of [ScrollStep](#scrollstep) changes.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Selected

[TabControlEventHandler](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventhandler) Fired when a tab is selected.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SelectedIndexChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the [SelectedIndex](#selectedindex) property has changed.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Selecting

[TabControlCancelEventHandler](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontrolcanceleventhandler) Occurs before a tab is selected, enabling a handler to cancel the tab change.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) TabClosed

[TabControlEventHandler](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventhandler) Occurs after a tab is closed by the user and has been removed from the tab control.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) TabClosing

[TabControlCancelEventHandler](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontrolcanceleventhandler) Occurs before a tab is closed by the user, enabling a handler to cancel the tab closing.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) TabMoved

[TabControlEventHandler](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventhandler) Fired when the user drags a [TabPage](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabpage) into a new position and the [AllowUserToMoveTabs](#allowusertomovetabs) property is set to true.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) TabVisibilityChanged

[TabControlEventHandler](https://docs.wisej.com/api/wisej.web/containers/tabcontrol/wisej.web.tabcontroleventhandler) Occurs after a tab is shown or hidden by the user through the [ShowVisibilityMenu](#showvisibilitymenu) or programmatically through the [Hidden](https://docs.wisej.com/api/wisej.web/containers/wisej.web.tabpage#hidden) property.

## Implements

| Name                                                                                                 | Description                                                                                                                              |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| [IUserData](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.iuserdata)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface.                          |
| [IBindableComponent](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.ibindablecomponent) | Bindable components implement this interface.                                                                                            |
| [IDropTarget](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.idroptarget)                 | Controls that support drag & drop operations implement this interface.                                                                   |
| [IWisejComponent](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejcomponent)       | All wisej components implement this interface.                                                                                           |
| [IWisejControl](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejcontrol)           | All wisej controls derived from the [Control](https://docs.wisej.com/api/wisej.web/general/control) class must implement this interface. |
| [IWisejSerializable](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejserializable) | Allows an object to serialize itself.                                                                                                    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/wisej.web/containers/tabcontrol.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
