# RibbonGroupCollection.Remove Method

> Removes an object of the type RibbonGroup from the 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 > RibbonGroupCollection.Remove Method
- **467 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbongroupcollection/remove-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbongroupcollection/remove-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbongroupcollection/remove-method/llms-full.txt

---

### Description

Removes an object of the type [RibbonGroup](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbongroup/llms-full.txt) from the collection.

### Syntax

```csharp
public void Remove(RibbonGroup ribbonGroup);
```

```vbnet
Public Sub Remove(ribbonGroup As RibbonGroup)
```

### Parameters

| Parameter | Description |
|---|---|
| ribbonGroup | The [RibbonGroup](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbongroup/llms-full.txt) to be removed from the collection. |

### Examples

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

```csharp
if (ribbonGroupCollection.Count > 0)
{
    TXTextControl.Windows.Forms.Ribbon.RibbonGroup ribbonGroup = ribbonGroupCollection[1];
    ribbonGroupCollection.Remove(ribbonGroup);
}
```

```vbnet
If ribbonGroupCollection.Count > 0 Then
    Dim ribbonGroup As TXTextControl.Windows.Forms.Ribbon.RibbonGroup = ribbonGroupCollection.Item(1)
    ribbonGroupCollection.Remove(ribbonGroup)
End If
```

---

## Nearby

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