Skip to content

AspTabIsSelectedChangedEventArgs.AspTab

property · AspTabIsSelectedChangedEventArgs · cAlgo.API

DesktopCLICloud

ASP 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 AspTab AspTab {get;}
aspTabIsSelectedChangedEventArgs.AspTab: AspTab

Returns AspTab

Examples

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);
}
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")