AddRange 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
Adds an array of controls to the end of the collection. These controls must be objects of type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator.
Syntax
public void AddRange(Control[] items);Public Sub AddRange(items As Control())Parameters
| Parameter | Description |
|---|---|
| items | An array of controls to be added to the end of this collection. |
Examples
The following example uses Add Range in a focused Ribbon Item Collection workflow. The created object is then available to the surrounding document workflow.
ribbonItemCollection.AddRange(new System.Windows.Forms.Control[] { new System.Windows.Forms.Control() });
Console.WriteLine("Ribbon Item Collection is ready for use.");ribbonItemCollection.AddRange(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 added 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 added.