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

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

# ToggleButton.BorderThickness

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

## BorderThickness

Gets or sets the border thickness. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, "5", "1 2 3 4".

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

Python:

```python
toggleButton.BorderThickness: Thickness
```

### Returns

`Thickness` — 

### Examples

C#:

```csharp
var toggleButton = new ToggleButton { Text = "Trailing", BorderColor = Color.White, BorderThickness = new Thickness(2) };
Chart.AddControl(toggleButton);
Print("Border thickness: {0}", toggleButton.BorderThickness.Top);
```

Python:

```python
toggleButton = ToggleButton()
toggleButton.Text = "Trailing"
toggleButton.BorderColor = Color.White
toggleButton.BorderThickness = Thickness(2)
api.Chart.AddControl(toggleButton)
api.Print(f"Border thickness: {toggleButton.BorderThickness.Top}")
```

