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 a specific row. These controls must be objects of type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator.
Syntax
public void AddRange(Control[] items, int row);Public Sub AddRange(items As Control(), row As Integer)Parameters
| Parameter | Description |
|---|---|
| items | An array of controls to be added to this group. |
| row | The row where to add the controls. Valid values are 0, 1 or 2. |
Examples
The following example uses Add Range in a focused Horizontal Ribbon Group workflow. The created object is then available to the surrounding document workflow.
horizontalRibbonGroup.AddRange(new System.Windows.Forms.Control[] { new System.Windows.Forms.Control() }, 1);
Console.WriteLine("Horizontal Ribbon Group is ready for use.");horizontalRibbonGroup.AddRange(New System.Windows.Forms.Control() { New System.Windows.Forms.Control() }, 1)
Console.WriteLine("Horizontal Ribbon Group is ready for use.")Limitations
RibbonButtons where the DisplayMode property is set to IconTextRelation.LargeIconLabeled cannot be added to a horizontal ribbon group.