# HorizontalRibbonGroup.InsertRange Method

> Inserts an array of controls at the specified index. These controls must be objects of type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator.

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

---

### Description

Inserts an array of controls at the specified index. These controls must be objects 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).

### Syntax

```csharp
public void InsertRange(int index, Control[] items, int row);
```

```vbnet
Public Sub InsertRange(index As Integer, items As Control(), row As Integer)
```

### Parameters

| Parameter | Description |
|---|---|
| index | The zero-based index at which the controls should be inserted. |
| items | An array of controls to be inserted to this group. |
| row | The row where to insert the controls. Valid values are 0, 1 or 2. |

### Examples

The following example uses Insert Range in a focused Horizontal Ribbon Group workflow. The created object is then available to the surrounding document workflow.

```csharp
horizontalRibbonGroup.InsertRange(1, new System.Windows.Forms.Control[] { new System.Windows.Forms.Control() }, 1);
Console.WriteLine("Horizontal Ribbon Group is ready for use.");
```

```vbnet
horizontalRibbonGroup.InsertRange(1, New System.Windows.Forms.Control() { New System.Windows.Forms.Control() }, 1)
Console.WriteLine("Horizontal Ribbon Group is ready for use.")
```

### 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.Insert Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/horizontalribbongroup/insert-method/llms-full.txt)
- **Next:** [IconTextRelation Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/icontextrelation/enumeration/llms-full.txt)
