# HorizontalRibbonGroup.Add Method

> Adds a control of type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator to the end of a specific row inside the horizontal ribbon group.

- **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 > HorizontalRibbonGroup.Add Method
- **707 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/horizontalribbongroup/add-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/horizontalribbongroup/add-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/horizontalribbongroup/add-method/llms-full.txt

---

### Description

Adds a control of 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) to the end of a specific row inside the horizontal ribbon group.

### Syntax

```csharp
public int Add(Control item, int row);
```

```vbnet
Public Function Add(item As Control, row As Integer) As Integer
```

### Parameters

| Parameter | Description |
|---|---|
| item | The control to be added to this group. |
| row | The row where to add the control. Valid values are 0, 1 or 2. |

### Return Value

The [RibbonItems property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbongroup/ribbonitems-property/llms-full.txt)'s collection index at which the value has been added.

### Examples

The following example adds an item to the horizontal ribbon group.

```csharp
var result = horizontalRibbonGroup.Add(new System.Windows.Forms.Control(), 1);
Console.WriteLine($"Add result: {result}");
```

```vbnet
Dim result = horizontalRibbonGroup.Add(New System.Windows.Forms.Control(), 1)
Console.WriteLine($"Add result: {result}")
```

### Limitations

[RibbonButtons](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonbutton/llms-full.txt) where the [DisplayMode](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonbutton/displaymode-property/llms-full.txt) property is set to [IconTextRelation.LargeIconLabeled](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/icontextrelation/enumeration/llms-full.txt) cannot be added to a horizontal ribbon group.

---

## Nearby

- **Previous:** [HorizontalRibbonGroup Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/horizontalribbongroup/llms-full.txt)
- **Next:** [HorizontalRibbonGroup.AddRange Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/horizontalribbongroup/addrange-method/llms-full.txt)
