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

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

# CheckBox.IsThreeState

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

## IsThreeState

Checks if the checkbox may be of three states - checked, unchecked and indeterminate.

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

Python:

```python
checkBox.IsThreeState: bool
```

### Returns

`bool` — 

### Examples

C#:

```csharp
var checkBox = new CheckBox { Text = "Hedge mode", IsThreeState = true, IsChecked = null };
checkBox.Indeterminate += args => Print("Hedge mode is undecided");
Chart.AddControl(checkBox);
```

Python:

```python
checkBox = CheckBox()
checkBox.Text = "Hedge mode"
checkBox.IsThreeState = True
checkBox.IsChecked = None
checkBox.Indeterminate += lambda args: api.Print("Hedge mode is undecided")
api.Chart.AddControl(checkBox)
```

