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

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

# TextBlock.TextTrimming

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

## TextTrimming

Gets or sets the text trimming behavior when the content overflows the content area.

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

Python:

```python
textBlock.TextTrimming: TextTrimming
```

### Returns

`TextTrimming` — 

### Examples

C#:

```csharp
var textBlock = new TextBlock { Text = "A very long position label that does not fit", Width = 120, TextTrimming = TextTrimming.CharacterEllipsis };
Chart.AddControl(textBlock);
```

Python:

```python
textBlock = TextBlock()
textBlock.Text = "A very long position label that does not fit"
textBlock.Width = 120
textBlock.TextTrimming = TextTrimming.CharacterEllipsis
api.Chart.AddControl(textBlock)
```

