Add 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 a control of type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator to the end of a specific row inside the horizontal ribbon group.
Syntax
public int Add(Control item, int row);Public Function Add(item As Control, row As Integer) As IntegerParameters
| Parameter | Description |
|---|---|
| item | The control to be added to this group. |
| row | The row where to add the control. Valid values are 0, 1 or 2. |
Return Value
The RibbonItems property's collection index at which the value has been added.
Examples
The following example adds an item to the horizontal ribbon group.
var result = horizontalRibbonGroup.Add(new System.Windows.Forms.Control(), 1);
Console.WriteLine($"Add result: {result}");Dim result = horizontalRibbonGroup.Add(New System.Windows.Forms.Control(), 1)
Console.WriteLine($"Add result: {result}")Limitations
RibbonButtons where the DisplayMode property is set to IconTextRelation.LargeIconLabeled cannot be added to a horizontal ribbon group.