Panel.Children
property · Panel · cAlgo.API Since 5.4
DesktopCLICloud
Gets panel children.
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 IEnumerable<ControlBase> Children {get;}
panel.Children: Iterable[ControlBase]
Returns IEnumerable<ControlBase>
Examples
var panel = new StackPanel();
panel.AddChild(new Button { Text = "Buy" });
panel.AddChild(new Button { Text = "Sell" });
foreach (var child in panel.Children.OfType<Button>())
child.IsEnabled = false;
Chart.AddControl(panel);
panel = StackPanel()
for text in ["Buy", "Sell"]:
button = Button()
button.Text = text
panel.AddChild(button)
for child in panel.Children:
child.IsEnabled = False
api.Chart.AddControl(panel)