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

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

# TextBox.SelectionColor

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

## SelectionColor

Gets or sets the text color of the current text selection.

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

Python:

```python
textBox.SelectionColor: Color
```

### Returns

`Color` — 

### Examples

C#:

```csharp
var textBox = new TextBox { Text = "Select this text", SelectionColor = Color.Yellow, SelectionOpacity = 0.5 };
Chart.AddControl(textBox);
```

Python:

```python
textBox = TextBox()
textBox.Text = "Select this text"
textBox.SelectionColor = Color.Yellow
textBox.SelectionOpacity = 0.5
api.Chart.AddControl(textBox)
```

