# TabPage

Namespace: **Wisej.Web**

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

* [Control](/api/wisej.web/general/control.md)
  * [ScrollableControl](/api/wisej.web/containers/scrollablecontrol.md)
    * [Panel](/api/wisej.web/containers/wisej.web.panel.md)
      * [TabPage](/api/wisej.web/containers/tabcontrol/wisej.web.tabpage.md)

Represents a single tab page in a [TabControl](/api/wisej.web/containers/tabcontrol.md).

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

```csharp
public class TabPage : Panel
```

{% endtab %}

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

```visual-basic
Public Class TabPage
    Inherits Panel
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/hsR4ok3152WyAf8J2C1u) TabPage()

Initializes a new instance of the [TabPage](/api/wisej.web/containers/tabcontrol/wisej.web.tabpage.md) class.

### ![](/files/hsR4ok3152WyAf8J2C1u) TabPage(text)

Initializes a new instance of the [TabPage](/api/wisej.web/containers/tabcontrol/wisej.web.tabpage.md) class and specifies the text to display as the title the tab.

| Name     | Type                                                          | Description           |
| -------- | ------------------------------------------------------------- | --------------------- |
| **text** | [String](https://docs.microsoft.com/dotnet/api/system.string) | The text for the tab. |

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) AllowHtml

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets a value indicating that the control can display html in the Text property. (Default: `False`)

Newlines (CRLF) are converted to \<BR/> when\
allowHtml is false, or when\
allowHtml is true and the text doesn't contain any html.

### ![](/files/hsR4ok3152WyAf8J2C1u) CharacterCasing

[CharacterCasing](/api/wisej.web/editors/wisej.web.charactercasing.md): Returns or sets the case of the text to display to the user. (Default: `Normal`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Hidden

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the [TabPage](/api/wisej.web/containers/tabcontrol/wisej.web.tabpage.md) is visible in the parent [TabControl](/api/wisej.web/containers/tabcontrol.md). (Default: `False`)

### ![](/files/hsR4ok3152WyAf8J2C1u) ImageIndex

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the index for the image in the [ImageList](/api/wisej.web/containers/tabcontrol.md#imagelist) of the associated [TabControl](/api/wisej.web/containers/tabcontrol.md). (Default: `-1`)

**Throws:**

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

### ![](/files/hsR4ok3152WyAf8J2C1u) ImageKey

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the key accessor for the image in the [ImageList](/api/wisej.web/containers/tabcontrol.md#imagelist) of the associated [TabControl](/api/wisej.web/containers/tabcontrol.md). (Default: `""`)

### ![](/files/hsR4ok3152WyAf8J2C1u) ShowCloseButton

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets a value indicating that the tab can show the close button next to the name. (Default: `False`)

### ![](/files/hsR4ok3152WyAf8J2C1u) ShowInVisibilityMenu

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the tab page should be included in the visibility menu. (Default: `True`)

### ![](/files/hsR4ok3152WyAf8J2C1u) TabBackColor

[Color](https://docs.microsoft.com/dotnet/api/system.drawing.color): Returns or sets the background color of the [TabPage](/api/wisej.web/containers/tabcontrol/wisej.web.tabpage.md) tab button. (Default: `Color [Empty]`)

### ![](/files/hsR4ok3152WyAf8J2C1u) TabControl

[TabControl](/api/wisej.web/containers/tabcontrol.md): Returns the parent [TabControl](/api/wisej.web/containers/tabcontrol.md).

### ![](/files/hsR4ok3152WyAf8J2C1u) TabForeColor

[Color](https://docs.microsoft.com/dotnet/api/system.drawing.color): Returns or sets the text color of the [TabPage](/api/wisej.web/containers/tabcontrol/wisej.web.tabpage.md) tab button. (Default: `Color [Empty]`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Text

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the text to display on the tab. (Default: `""`)

### ![](/files/hsR4ok3152WyAf8J2C1u) ToolTipText

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the ToolTip text for this tab. (Default: `""`)

### ![](/files/hsR4ok3152WyAf8J2C1u) UseMnemonic

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the first character that is preceded by an ampersand (&) is used as the mnemonic key of the control. (Default: `True`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Visible

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the control and all its child controls are displayed. (Default: `False`)

## Methods

### ![](/files/lzopMboA31bVq8UIcbT3) CreateControlsInstance()

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

### ![](/files/lIX317sDtMTZJBi9oSIx) GetTabPageOfComponent(control)

Retrieves the tab page that contains the specified [Control](/api/wisej.web/general/control.md).

| Parameter   | Type                                         | Description                                                   |
| ----------- | -------------------------------------------- | ------------------------------------------------------------- |
| **control** | [Control](/api/wisej.web/general/control.md) | The [Control](/api/wisej.web/general/control.md) to look for. |

**Returns:** [TabPage](/api/wisej.web/containers/tabcontrol/wisej.web.tabpage.md). The [TabPage](/api/wisej.web/containers/tabcontrol/wisej.web.tabpage.md) that contains the specified [Control](/api/wisej.web/general/control.md), or null if it cannot be found.

### ![](/files/hsR4ok3152WyAf8J2C1u) GetTabRect()

Returns the bounding rectangle for a specified tab in this tab control.

**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.

### ![](/files/lzopMboA31bVq8UIcbT3) OnTextChanged(e)

Fires the [TextChanged](/api/wisej.web/general/control.md#textchanged) 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. |

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebEvent(e)

Processes the event from the client.

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

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebRender(config)

Renders the client component.

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

### ![](/files/lzopMboA31bVq8UIcbT3) 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. |

### ![](/files/lzopMboA31bVq8UIcbT3) RenderPanelProperties(config)

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

### ![](/files/lzopMboA31bVq8UIcbT3) Select()

Selects the current [TabPage](/api/wisej.web/containers/tabcontrol/wisej.web.tabpage.md).

### ![](/files/lzopMboA31bVq8UIcbT3) SetBoundsCore(x, y, width, height, specified)

This member overrides [SetBoundsCore](/api/wisej.web/general/control.md#setboundscore).

| Parameter     | Type                                                                        | Description                                                                                          |
| ------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **x**         | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | The new [Left](/api/wisej.web/general/control.md#left) property value of the control.                |
| **y**         | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | The new [Top](/api/wisej.web/general/control.md#top) property value of the control.                  |
| **width**     | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | The new [Width](/api/wisej.web/general/control.md#width) property value of the control.              |
| **height**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                 | The new [Height](/api/wisej.web/general/control.md#height) property value of the control.            |
| **specified** | [BoundsSpecified](/api/wisej.web/enumerations/wisej.web.boundsspecified.md) | A combination of [BoundsSpecified](/api/wisej.web/enumerations/wisej.web.boundsspecified.md) values. |

### ![](/files/hsR4ok3152WyAf8J2C1u) Update()

Overridden to update the parent TabControl when in design mode.

## Events

### ![](/files/hsR4ok3152WyAf8J2C1u) TextChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the value of the [Text](/api/wisej.web/containers/tabcontrol.md#text) property changes.

## Implements

| Name                                                                              | Description                                                                                                           |
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| [IUserData](/api/wisej.web/interfaces/wisej.web.iuserdata.md)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface.       |
| [IBindableComponent](/api/wisej.web/data-binding/wisej.web.ibindablecomponent.md) | Bindable components implement this interface.                                                                         |
| [IDropTarget](/api/wisej.web/interfaces/wisej.web.idroptarget.md)                 | Controls that support drag & drop operations implement this interface.                                                |
| [IImage](/api/wisej.web/interfaces/wisej.web.iimage.md)                           | Provides access to common image properties across the controls that implement this interface.                         |
| [IWisejComponent](/api/wisej.core/interfaces/wisej.core.iwisejcomponent.md)       | All wisej components implement this interface.                                                                        |
| [IWisejControl](/api/wisej.core/interfaces/wisej.core.iwisejcontrol.md)           | All wisej controls derived from the [Control](/api/wisej.web/general/control.md) class must implement this interface. |
| [IWisejSerializable](/api/wisej.core/interfaces/wisej.core.iwisejserializable.md) | 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/wisej.web.tabpage.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.
