---
id: "P:cAlgo.API.Panel.ChildCount"
kind: "property"
type: "T:cAlgo.API.Panel"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Panel/ChildCount/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Panel.ChildCount

Member of [Panel](https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Panel/index.md).

## ChildCount

Gets count of panel children.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Accepted without error but never displayed, so control events such as Click are never raised.
- Cloud: Accepted without error but never displayed, so control events such as Click are never raised.

C#:

```csharp
public int ChildCount {get;}
```

Python:

```python
panel.ChildCount: int
```

### Returns

`int` — 

Available since cAlgo.API 5.4.

### Examples

C#:

```csharp
var panel = new StackPanel();
foreach (var position in Positions)
    panel.AddChild(new TextBlock { Text = position.SymbolName + " " + position.NetProfit });
Chart.AddControl(panel);
Print("Rows: {0}", panel.ChildCount);
```

Python:

```python
panel = StackPanel()
for position in api.Positions:
    row = TextBlock()
    row.Text = f"{position.SymbolName} {position.NetProfit}"
    panel.AddChild(row)
api.Chart.AddControl(panel)
api.Print(f"Rows: {panel.ChildCount}")
```

