---
id: "T:cAlgo.API.TradeWatchTabSizeChangedEventArgs"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabSizeChangedEventArgs/"
---

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

# TradeWatchTabSizeChangedEventArgs (class)

Provides data for plugin trade watch tab SizeChanged event.

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 class TradeWatchTabSizeChangedEventArgs
```

## Examples

C#:

```csharp
protected override void OnStart()
{
    var tab = TradeWatch.AddTab("My Tab");
    tab.Child = new TextBlock { Text = "Hello from plugin" };
    tab.SizeChanged += OnTradeWatchTabSizeChanged;
}

private void OnTradeWatchTabSizeChanged(TradeWatchTabSizeChangedEventArgs args)
{
    Print("Tab {0} resized to {1} x {2}", args.TradeWatchTab.Title, args.TradeWatchTab.Width, args.TradeWatchTab.Height);
}
```

Python:

```python
def on_start(self):
    tab = api.TradeWatch.AddTab("My Tab")
    text_block = TextBlock()
    text_block.Text = "Hello from plugin"
    tab.Child = text_block
    tab.SizeChanged += self.on_trade_watch_tab_size_changed

def on_trade_watch_tab_size_changed(self, args):
    api.Print(f"Tab {args.TradeWatchTab.Title} resized to {args.TradeWatchTab.Width} x {args.TradeWatchTab.Height}")
```

## Properties

- `public TradeWatchTab TradeWatchTab {get;}` — Trade watch tab. [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/TradeWatchTabSizeChangedEventArgs/TradeWatchTab/index.md)

