---
id: "M:cAlgo.API.TabItem.#ctor"
kind: "constructor"
type: "T:cAlgo.API.TabItem"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/TabItem/Constructor/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# TabItem constructor

Member of [TabItem](https://help.ctrader.com/ctrader-algo/references/Controls/TabItem/index.md).

## TabItem()

Initializes a new instance of the TabItem class.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Accepted without error but never displayed, so control events such as Click are never raised.
- Cloud: Accepted without error but never displayed, so control events such as Click are never raised.

C#:

```csharp
public TabItem()
```

Python:

```python
TabItem()
```

Available since cAlgo.API 5.2.

### Examples

C#:

```csharp
var tabItem = new TabItem { Header = new TextBlock { Text = "Orders" } };
var tabControl = new TabControl();
tabControl.AddTab(tabItem);
Chart.AddControl(tabControl);
```

Python:

```python
header = TextBlock()
header.Text = "Orders"
tabItem = TabItem()
tabItem.Header = header
tabControl = TabControl()
tabControl.AddTab(tabItem)
api.Chart.AddControl(tabControl)
```

