---
id: "P:cAlgo.API.AspTabIsSelectedChangedEventArgs.AspTab"
kind: "property"
type: "T:cAlgo.API.AspTabIsSelectedChangedEventArgs"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/AspTabIsSelectedChangedEventArgs/AspTab/"
---

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

# AspTabIsSelectedChangedEventArgs.AspTab

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

## AspTab

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

C#:

```csharp
public AspTab AspTab {get;}
```

Python:

```python
aspTabIsSelectedChangedEventArgs.AspTab: AspTab
```

### Returns

`AspTab` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    var tab = Asp.AddTab("My Tab");
    tab.IsSelectedChanged += OnTabIsSelectedChanged;
}

private void OnTabIsSelectedChanged(AspTabIsSelectedChangedEventArgs args)
{
    if (args.AspTab.IsSelected)
        Print("Tab {0} at index {1} was selected", args.AspTab.Id, args.AspTab.Index);
}
```

Python:

```python
def on_start(self):
    tab = api.Asp.AddTab("My Tab")
    tab.IsSelectedChanged += self.on_tab_is_selected_changed

def on_tab_is_selected_changed(self, args):
    if args.AspTab.IsSelected:
        api.Print(f"Tab {args.AspTab.Id} at index {args.AspTab.Index} was selected")
```

