InsertRange Method
- Namespace
TXTextControl.Windows. Forms. Ribbon
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWindows. Forms. dll
Description
Inserts an array of controls at the specified index. These controls must be objects of type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator.
Syntax
public void InsertRange(int index, Control[] items);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.
ribbonItemCollection.InsertRange(1, new System.Windows.Forms.Control[] { new System.Windows.Forms.Control() });
Console.WriteLine("Ribbon Item Collection is ready for use.");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 controls are inserted to the group's first row.
If the RibbonItemCollection is optained by a HorizontalRibbonGroup RibbonButtons where the DisplayMode property is set to IconTextRelation.LargeIconLabeled cannot be inserted.