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

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

# TextBlock.LineStackingStrategy

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

## LineStackingStrategy

Gets or sets the mechanism by which a line box is determined for each line of text within the TextBlock.

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

Python:

```python
textBlock.LineStackingStrategy: LineStackingStrategy
```

### Returns

`LineStackingStrategy` — 

### Examples

C#:

```csharp
var textBlock = new TextBlock { Text = "Line 1\nLine 2", LineHeight = 20, LineStackingStrategy = LineStackingStrategy.BlockLineHeight };
Chart.AddControl(textBlock);
```

Python:

```python
textBlock = TextBlock()
textBlock.Text = "Line 1\nLine 2"
textBlock.LineHeight = 20
textBlock.LineStackingStrategy = LineStackingStrategy.BlockLineHeight
api.Chart.AddControl(textBlock)
```

