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

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

# Control.FontWeight

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

## FontWeight

Gets or sets the font weight.

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

Python:

```python
control.FontWeight: FontWeight
```

### Returns

`FontWeight` — 

### Examples

C#:

```csharp
var textBlock = new TextBlock { Text = "Stop loss hit", FontWeight = FontWeight.Bold, ForegroundColor = Color.Red };
Chart.AddControl(textBlock);
```

Python:

```python
textBlock = TextBlock()
textBlock.Text = "Stop loss hit"
textBlock.FontWeight = FontWeight.Bold
textBlock.ForegroundColor = Color.Red
api.Chart.AddControl(textBlock)
```

