# RibbonItemCollection.Remove Method

> Removes a control of the type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator from this collection.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Namespace:** `TXTextControl.Windows.Forms.Ribbon`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Windows.Forms.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.Windows.Forms.Ribbon > RibbonItemCollection.Remove Method
- **537 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonitemcollection/remove-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonitemcollection/remove-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonitemcollection/remove-method/llms-full.txt

---

### Description

Removes a control of the type [RibbonButton](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonbutton/llms-full.txt), [RibbonComboBox](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribboncombobox/llms-full.txt), [RibbonLabel](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonlabel/llms-full.txt), [RibbonListView](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonlistview/llms-full.txt), [RibbonTextBox](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/llms-full.txt) or [RibbonSeperator](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonseperator/llms-full.txt) from this collection.

### Syntax

```csharp
public void Remove(Control item);
```

```vbnet
Public Sub Remove(item As Control)
```

### Parameters

| Parameter | Description |
|---|---|
| item | The control to be removed from this collection. |

### Examples

The following example removes the first control when the collection is not empty.

```csharp
if (ribbonItemCollection.Count > 0)
{
    System.Windows.Forms.Control control = ribbonItemCollection[1];
    ribbonItemCollection.Remove(control);
}
```

```vbnet
If ribbonItemCollection.Count > 0 Then
    Dim control As System.Windows.Forms.Control = ribbonItemCollection.Item(1)
    ribbonItemCollection.Remove(control)
End If
```

---

## Nearby

- **Previous:** [RibbonItemCollection.Item Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonitemcollection/item-property/llms-full.txt)
- **Next:** [RibbonLabel Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonlabel/llms-full.txt)
