Hey,
I'm trying to search through all tabs to find a specific text.
if the text is found, the tab will be hidden, or shown.
I tried this to hide:
btnHide
and this to show:Code:Dim txt As Object Dim tabp As TabPage For Each tabp In TabControl1.TabPages For Each txt In tabp.Controls If TypeOf txt Is Label Then If txt.text = "Kapaza" Then tabp.Hide() End If End If Next Next
btnShow
but it only hides the controls on the currently selected tab.Code:Dim txt As Object Dim tabp As TabPage For Each tabp In TabControl1.TabPages For Each txt In tabp.Controls If TypeOf txt Is Label Then If txt.text = "Kapaza" Then tabp.Show() End If End If Next Next
It should hide the tab (when pressing btnHide)
(so remove it from the list of tabs)
But it should be shown again at the press of btnShow
(added again to the list, at the end)




Reply With Quote