Insert 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 a control of type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator at the specified index.
Syntax
public void Insert(int index, Control item, int row);Public Sub Insert(index As Integer, item As Control, row As Integer)Parameters
| Parameter | Description |
|---|---|
| index | The zero-based index at which the control should be inserted. |
| item | The control to be inserted to this group. |
| row | The row where to insert the control. Valid values are 0, 1 or 2. |
Examples
The following example uses Insert in a focused Horizontal Ribbon Group workflow. The created object is then available to the surrounding document workflow.
horizontalRibbonGroup.Insert(1, new System.Windows.Forms.Control(), 1);
Console.WriteLine("Horizontal Ribbon Group is ready for use.");horizontalRibbonGroup.Insert(1, 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.
If the number of rows, that contain ribbon items, is larger than the defined number of rows, only those rows are displayed that are in this defined range.