Panel.RemoveChild
method · Panel · cAlgo.API
DesktopCLICloud
Removes the child element.
Environment behaviour
CLI — not supported. Accepted without error but never displayed, so control events such as Click are never raised.
Cloud — not supported. Accepted without error but never displayed, so control events such as Click are never raised.
Definition
public void RemoveChild(ControlBase child)
panel.RemoveChild(child: ControlBase) -> None
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
child | ControlBase | ControlBase | The child. |
Examples
var panel = new StackPanel();
var warning = new TextBlock { Text = "Spread is high", ForegroundColor = Color.Red };
panel.AddChild(warning);
Chart.AddControl(panel);
if (Symbol.Spread / Symbol.PipSize < 2)
panel.RemoveChild(warning);
panel = StackPanel()
warning = TextBlock()
warning.Text = "Spread is high"
warning.ForegroundColor = Color.Red
panel.AddChild(warning)
api.Chart.AddControl(panel)
if api.Symbol.Spread / api.Symbol.PipSize < 2:
panel.RemoveChild(warning)