Removes the tab from the control.
Class: TabClass
Namespace: Softelvdm.SftTabsNET
Assembly: Softelvdm.SftTabsNET
public void Remove();
Public Sub Remove()
Removes the tab from the control.
The tab's page and the controls it hosts are disposed.
Color color = sftTabs1.DarkModeActive ? Color.White : SystemColors.ControlText;
foreach (TabClass tab in sftTabs1.Tabs)
tab.Page.ForeColor = color;
}
private void sftTabs1_TabCloseButtonClicked(object sender, TabEventArgs e) {
// the control does not remove the tab, the application does
tabImages.Remove(e.Tab);
e.Tab.Remove();
}
private void sftTabs1_CloseButtonClicked(object sender, EventArgs e) {
// the control's Close button removes the selected tab in this sample
TabClass tab = sftTabs1.SelectedTab;
if (tab != null) {
tabImages.Remove(tab);
For Each tab As TabClass In SftTabs1.Tabs
tab.Page.ForeColor = fore
Next
End Sub
Private Sub SftTabs1_TabCloseButtonClicked(ByVal sender As System.Object, ByVal e As Softelvdm.SftTabsNET.TabEventArgs) Handles SftTabs1.TabCloseButtonClicked
' the control does not remove the tab, the application does
tabImages.Remove(e.Tab)
e.Tab.Remove()
End Sub
Private Sub SftTabs1_CloseButtonClicked(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SftTabs1.CloseButtonClicked
' the control's Close button removes the selected tab in this sample
Dim tab As TabClass = SftTabs1.SelectedTab
If tab IsNot Nothing Then
tabImages.Remove(tab)See Also TabClass Class | Classes | SftTabs/NET 3.0