Sheritlw
asked on
Retrieve TabPage from ArrayList
I have been looking on the net for a way to hide/show tabpages in a tabcontrol.
I found a topic on adding the tabpages to an arraylist so they can be easily retrieved after being removed.
I have them hiding/removing using
Private aHideTabPages As New ArrayList()
Public Sub HideTab(ByVal t As Object)
aHideTabPages.Add(Me.TabRa cing.TabPa ges(t))
'Remove page from tabcontrol
TabRacing.TabPages.RemoveA t(t)
End Sub
But how do I bring back the correct tab?
I looked all over the net trying to find a solution, with no luck, so I tried ---
Private Sub ShowTab(ByVal t As Object)
TabRacing.TabPages.Add(aHi deTabPages .Item(t))
End Sub
This doesn't work.
Please provide an example (no links please) of how I would retrieve the correct tabpage back from the arraylist.
Thanks
I found a topic on adding the tabpages to an arraylist so they can be easily retrieved after being removed.
I have them hiding/removing using
Private aHideTabPages As New ArrayList()
Public Sub HideTab(ByVal t As Object)
aHideTabPages.Add(Me.TabRa
'Remove page from tabcontrol
TabRacing.TabPages.RemoveA
End Sub
But how do I bring back the correct tab?
I looked all over the net trying to find a solution, with no luck, so I tried ---
Private Sub ShowTab(ByVal t As Object)
TabRacing.TabPages.Add(aHi
End Sub
This doesn't work.
Please provide an example (no links please) of how I would retrieve the correct tabpage back from the arraylist.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great idea. Thank you .. works great!
ASKER
I am setting up your code now.
Thanks