TradeWatchTabSizeChangedEventArgs
class cAlgo.API
DesktopCLICloud
Provides data for plugin trade watch tab SizeChanged event.
Environment behaviour
CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.
Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.
Definition
public class TradeWatchTabSizeChangedEventArgs
Namespace: cAlgo.API · Group: EventArgs
Examples
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);
}
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
| Name | Description |
|---|---|
TradeWatchTabDesktopCLICloudTradeWatchTab | Trade watch tab. |