If you don't need a tab temporarily, Instead of disabling it or removing it, you can simply hide it. When it's needed again, unhide it.
Show/hide a tabstrip tab:
'visible->hidden, or hidden->visible
Public Sub toggleTab(TabStrip1 As TabStrip, tabName As String) As Boolean
For Each lbl As Label In GetAllTabLabels(TabStrip1)
If lbl.Text=tabName Then
lbl.Visible= lbl.Visible=False
Return True
End If
Next
Return False 'incorrect tab name provided
End Sub
Public Sub GetAllTabLabels (tabstrip As TabStrip) As List
Dim jo As JavaObject = tabstrip
Dim r As Reflector
r.Target = jo.GetField("tabStrip")
Dim tc As Panel = r.GetField("tabsContainer")
Dim res As List
res.Initialize
For Each v As View In tc
If v Is Label Then res.Add(v)
Next
Return res
End Sub
Last edited: