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

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

# TextBlock.TextWrapping

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

## TextWrapping

Gets or sets the way how the TextBlock should wrap the text.

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

Python:

```python
textBlock.TextWrapping: TextWrapping
```

### Returns

`TextWrapping` — 

### Examples

C#:

```csharp
var textBlock = new TextBlock { Text = "This trading note is long and wraps onto several lines", Width = 150, TextWrapping = TextWrapping.Wrap };
Chart.AddControl(textBlock);
```

Python:

```python
textBlock = TextBlock()
textBlock.Text = "This trading note is long and wraps onto several lines"
textBlock.Width = 150
textBlock.TextWrapping = TextWrapping.Wrap
api.Chart.AddControl(textBlock)
```

