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

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

# ControlBase.IsHitTestVisible

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

## IsHitTestVisible

Gets or sets a value that declares if the chart control instance is visible for the mouse hit testing. If set to false, then the control will not handle any mouse events.

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

Python:

```python
controlBase.IsHitTestVisible: bool
```

### Returns

`bool` — 

### Examples

C#:

```csharp
var watermark = new TextBlock { Text = "Demo account", FontSize = 40, Opacity = 0.2, IsHitTestVisible = false };
watermark.HorizontalAlignment = HorizontalAlignment.Center;
watermark.VerticalAlignment = VerticalAlignment.Center;
Chart.AddControl(watermark);
```

Python:

```python
watermark = TextBlock()
watermark.Text = "Demo account"
watermark.FontSize = 40
watermark.Opacity = 0.2
watermark.IsHitTestVisible = False
watermark.HorizontalAlignment = HorizontalAlignment.Center
watermark.VerticalAlignment = VerticalAlignment.Center
api.Chart.AddControl(watermark)
```

