Yes. You can call TabHost.RemoveView to remove the tabhost from its parent and then initialize it and add it again.
I have done what Erel suggested, remove my tabhost from the parent and initialize it and add it again but this is causing a little problem
When I remove it and initialize the TabChanged routine gets called. WOW - my program was not ready for that. Is this supposed to happed. It did not happen the first time I initialize the TabHost
'gCallStack.Add("CreateScreen - Before doing something with gTabs")
If gTabs.IsInitialized = False Then
'gCallStack.Add("CreateScreen - new gTabs - 01")
gTabs.Initialize("gTabs")
'gCallStack.Add("CreateScreen - new gTabs - 02")
gTabs.Enabled = False
'gCallStack.Add("CreateScreen - new gTabs - 03")
Else
'gCallStack.Add("CreateScreen - old gTabs - 01")
gTabs.Enabled = False
'gCallStack.Add("CreateScreen - old gTabs - 02")
gTabs.RemoveView
'gCallStack.Add("CreateScreen - old gTabs - 03")
gTabs.Initialize("gTabs") ' <============== TabChanged routine getting called
End If
'gCallStack.Add("CreateScreen - After doing something with gTabs")
IS this a BUG or a Feature of TabHost? I have since added a flag to my CreateScreen to show not completed yet, that the TabChanged routine checks but is this necessary?
Thanks for any help.
PS: Overlook the gCallStack stuff, just pushing stuff onto a list so I knew where I was and where I came from.
BobVal