Skip to content

AspBlockAttachedEventArgs

class cAlgo.API

DesktopCLICloud

Provides data for plugin ASP block attached 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 AspBlockAttachedEventArgs

Namespace: cAlgo.API · Group: EventArgs

Examples

protected override void OnStart()
{
    var block = Asp.SymbolTab.AddBlock("My Block");
    block.Child = new TextBlock { Text = "Hello from plugin" };
    block.Attached += OnBlockAttached;
}

private void OnBlockAttached(AspBlockAttachedEventArgs args)
{
    Print("Block {0} attached back to the active symbol panel", args.AspBlock.Title);
}
def on_start(self):
    block = api.Asp.SymbolTab.AddBlock("My Block")
    text_block = TextBlock()
    text_block.Text = "Hello from plugin"
    block.Child = text_block
    block.Attached += self.on_block_attached

def on_block_attached(self, args):
    api.Print(f"Block {args.AspBlock.Title} attached back to the active symbol panel")

Properties

Name Description
AspBlockDesktopCLICloudAspBlock Attached block.

See also