AspBlockDetachedEventArgs
class cAlgo.API
DesktopCLICloud
Provides data for plugin ASP block detached 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 AspBlockDetachedEventArgs
Namespace: cAlgo.API · Group: EventArgs
Examples
protected override void OnStart()
{
var block = Asp.SymbolTab.AddBlock("My Block");
block.IsDetachable = true;
block.Child = new TextBlock { Text = "Hello from plugin" };
block.Detached += OnBlockDetached;
}
private void OnBlockDetached(AspBlockDetachedEventArgs args)
{
Print("Block {0} detached from the active symbol panel", args.AspBlock.Title);
}
def on_start(self):
block = api.Asp.SymbolTab.AddBlock("My Block")
block.IsDetachable = True
text_block = TextBlock()
text_block.Text = "Hello from plugin"
block.Child = text_block
block.Detached += self.on_block_detached
def on_block_detached(self, args):
api.Print(f"Block {args.AspBlock.Title} detached from the active symbol panel")
Properties
| Name | Description |
|---|---|
AspBlockDesktopCLICloudAspBlock | Detached block. |