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

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

# ControlBase.IsVisible

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

## IsVisible

Gets or sets the value indicating whether this instance of the chart control instance is visible.

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

Python:

```python
controlBase.IsVisible: bool
```

### Returns

`bool` — 

### Examples

C#:

```csharp
var textBlock = new TextBlock { Text = "No open positions" };
textBlock.IsVisible = Positions.Count == 0;
Chart.AddControl(textBlock);
Print("Visible: {0}", textBlock.IsVisible);
```

Python:

```python
textBlock = TextBlock()
textBlock.Text = "No open positions"
textBlock.IsVisible = api.Positions.Count == 0
api.Chart.AddControl(textBlock)
api.Print(f"Visible: {textBlock.IsVisible}")
```

