Hi,
I like to close a TabPage in code by name, no idea how
I like to close a TabPage in code by name, no idea how
B4X:
Sub CloseTab(inp As String)
For Each v As Node In MainForm.RootPane.GetAllViewsRecursive
If v Is TabPane Then
Dim a As TabPane
a = v
Dim l As List
l.Initialize
l.AddAll(a.Tabs)
Dim x As Int = 0
For x = 0 To l.Size - 1
Dim az As TabPage = l.Get(x)
If az.Text = inp Then
'close this Tab
End If
Next
End If
Next
End Sub