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

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

# Control.FontStyle

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

## FontStyle

Gets or sets the font style.

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

Python:

```python
control.FontStyle: FontStyle
```

### Returns

`FontStyle` — 

### Examples

C#:

```csharp
var textBlock = new TextBlock { Text = "Backtesting mode", FontStyle = FontStyle.Italic };
Chart.AddControl(textBlock);
```

Python:

```python
textBlock = TextBlock()
textBlock.Text = "Backtesting mode"
textBlock.FontStyle = FontStyle.Italic
api.Chart.AddControl(textBlock)
```

