Skip to content

AspTab

interface cAlgo.API

DesktopCLICloud

Represents an active symbol panel tab.

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 interface AspTab

Namespace: cAlgo.API · Group: Asp

Examples

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;
        }
    }
}
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
{
  "AccessRights": "None"
}

Properties

Name Description
ChildDesktopCLICloudControlBase Get / set content of current tab.
IdDesktopCLICloudstring Returns unique ID of the current tab.
IndexDesktopCLICloudint Get / set index of current tab (Must be greater than zero).
IsSelectedDesktopCLICloudbool Get / set selected state of current tab.
TitleDesktopCLICloudstring Returns title of the current tab.

Events

Name Description
IsSelectedChangedDesktopCLICloudAction<AspTabIsSelectedChangedEventArgs> Occurs after tab IsSelected value change.

See also