# RibbonItemCollection.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 > RibbonItemCollection.InsertRange Method
- **785 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonitemcollection/insertrange-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonitemcollection/insertrange-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonitemcollection/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);
```

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

### Parameters

| Parameter | Description |
|---|---|
| index | The zero-based index at which the controls should be inserted. |
| items | An array of controlsto be inserted. |

### Examples

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

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

```vbnet
ribbonItemCollection.InsertRange(1, New System.Windows.Forms.Control() { New System.Windows.Forms.Control() })
Console.WriteLine("Ribbon Item Collection is ready for use.")
```

### Limitations

If the RibbonItemCollection is optained by a [HorizontalRibbonGroup](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/horizontalribbongroup/llms-full.txt) controls are inserted to the group's first row.

If the RibbonItemCollection is optained by a [HorizontalRibbonGroup](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/horizontalribbongroup/llms-full.txt) [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 inserted.

---

## Nearby

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