---
id: "M:cAlgo.API.ChartArea.RemoveControl(cAlgo.API.ControlBase)"
kind: "method"
type: "T:cAlgo.API.ChartArea"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/RemoveControl/"
---

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

# ChartArea.RemoveControl

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

## RemoveControl(ControlBase control)

Remove a chart control from the chart area.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Has no visible effect: the CLI displays no chart, so no control was ever shown.
- Cloud: Has no visible effect: the cloud displays no chart, so no control was ever shown.

C#:

```csharp
void RemoveControl(ControlBase control)
```

Python:

```python
chartArea.RemoveControl(control: ControlBase) -> None
```

### Parameters

- `control` (`ControlBase`, Python `ControlBase`): An existing control that will be removed

### Examples

C#:

```csharp
var textBlock = new TextBlock { Text = "Loading...", HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center };
Chart.AddControl(textBlock);
Chart.RemoveControl(textBlock);
Print("Loading message removed");
```

Python:

```python
textBlock = TextBlock()
textBlock.Text = "Loading..."
api.Chart.AddControl(textBlock)
api.Chart.RemoveControl(textBlock)
api.Print("Loading message removed")
```

