---
id: "M:cAlgo.API.ProgressBar.#ctor"
kind: "constructor"
type: "T:cAlgo.API.ProgressBar"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/ProgressBar/Constructor/"
---

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

# ProgressBar constructor

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

## ProgressBar()

Initializes a new instance of the ProgressBar class.

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 ProgressBar()
```

Python:

```python
ProgressBar()
```

Available since cAlgo.API 5.1.

### Examples

C#:

```csharp
var progressBar = new ProgressBar { Width = 200, Height = 20, Minimum = 0, Maximum = 100, Value = 25 };
Chart.AddControl(progressBar);
```

Python:

```python
progressBar = ProgressBar()
progressBar.Width = 200
progressBar.Height = 20
progressBar.Value = 25
api.Chart.AddControl(progressBar)
```

