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

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

# ControlBase.MinWidth

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

## MinWidth

Gets or sets the minimum width of the chart control.

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 double MinWidth {get; set;}
```

Python:

```python
controlBase.MinWidth: float
```

### Returns

`double` — The minimum width.

### Examples

C#:

```csharp
var textBox = new TextBox { Text = "EURUSD", MinWidth = 100 };
Chart.AddControl(textBox);
Print("Minimum width: {0}", textBox.MinWidth);
```

Python:

```python
textBox = TextBox()
textBox.Text = "EURUSD"
textBox.MinWidth = 100
api.Chart.AddControl(textBox)
api.Print(f"Minimum width: {textBox.MinWidth}")
```

