---
id: "T:cAlgo.API.AspTab"
kind: "interface"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/"
---

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

# AspTab (interface)

Represents an active symbol panel tab.

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

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

## Definition

```csharp
public interface AspTab
```

## Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo.Plugins
{
    public partial class Test : Plugin
    {
        protected override void OnStart()
        {
            var aspTab = Asp.AddTab("Test Tab");

            var panel = new StackPanel {Orientation = Orientation.Vertical};

            var textBlock = new TextBlock {Text = "Show anything"};

            panel.AddChild(textBlock);

            var removeTabButton = new Button {Text = "Remove Tab"};

            removeTabButton.Click += args => Asp.RemoveTab(aspTab);

            panel.AddChild(removeTabButton);

            aspTab.Child = panel;

            aspTab.IsSelectedChanged += args => Print($"ASP tab selection changed, IsSelected: {args.AspTab.IsSelected}");

            aspTab.IsSelected = true;
        }
    }
}
```

Python:

```python
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def on_start(self):
        aspTab = api.Asp.AddTab("Test Tab")

        panel = StackPanel()
        panel.Orientation = Orientation.Vertical

        textBlock = TextBlock()
        textBlock.Text = "Show anything"

        panel.AddChild(textBlock)

        removeTabButton = Button()
        removeTabButton.Text = "Remove Tab"
        removeTabButton.Click += lambda _: api.Asp.RemoveTab(aspTab)

        panel.AddChild(removeTabButton)

        aspTab.Child = panel
        aspTab.IsSelectedChanged += lambda args: print(f"ASP tab selection changed, IsSelected: {args.AspTab.IsSelected}")
        aspTab.IsSelected = True
```

config.json:

```json
{
  "AccessRights": "None"
}
```

## Properties

- `ControlBase Child {get; set;}` — Get / set content of current tab. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/Child/index.md)
- `string Id {get;}` — Returns unique ID of the current tab. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/Id/index.md)
- `int Index {get; set;}` — Get / set index of current tab (Must be greater than zero). [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/Index/index.md)
- `bool IsSelected {get; set;}` — Get / set selected state of current tab. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/IsSelected/index.md)
- `string Title {get;}` — Returns title of the current tab. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/Title/index.md)

## Events

- `event Action<AspTabIsSelectedChangedEventArgs> IsSelectedChanged;` — Occurs after tab IsSelected value change. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspTab/IsSelectedChanged/index.md)

