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

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

# TextBox.MinLines

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

## MinLines

Gets or sets the minimum number of visible lines.

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

Python:

```python
textBox.MinLines: int
```

### Returns

`int` — 

### Examples

C#:

```csharp
var commentTextBox = new TextBox { AcceptsReturn = true, MinLines = 2, MaxLines = 6 };
Chart.AddControl(commentTextBox);
Print("Minimum lines: {0}", commentTextBox.MinLines);
```

Python:

```python
commentTextBox = TextBox()
commentTextBox.AcceptsReturn = True
commentTextBox.MinLines = 2
commentTextBox.MaxLines = 6
api.Chart.AddControl(commentTextBox)
api.Print(f"Minimum lines: {commentTextBox.MinLines}")
```

