Remove 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
Removes a control of the type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator from this collection.
Syntax
public void Remove(Control item);Public Sub Remove(item As Control)Parameters
| Parameter | Description |
|---|---|
| item | The control to be removed from this collection. |
Examples
The following example removes the first control when the collection is not empty.
if (ribbonItemCollection.Count > 0)
{
System.Windows.Forms.Control control = ribbonItemCollection[1];
ribbonItemCollection.Remove(control);
}If ribbonItemCollection.Count > 0 Then
Dim control As System.Windows.Forms.Control = ribbonItemCollection.Item(1)
ribbonItemCollection.Remove(control)
End If