How to Add TabHost while run time?

Theera

Expert
Licensed User
Longtime User
Hi All,
Please help me..
I create Tabhost has 1 Tab. whenever I click title tab ,it will add another tab. Look like MS IE Browser.
P.S. I use TabHostExtras Library.
Best Regards
Theera
 

Theera

Expert
Licensed User
Longtime User
You can use TabHost.AddTab to add another tab.

Thank you for Answer.But I've used TabHost.AddTab,it doesn't response.
Best Regards
Theera
 
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
The code you posted works but propably not as you expect.
- You are adding the new Tab in TabHost1_Click event, it's not the best place.
- You are loading the same layout in the new tab ?
- You don't need a Panel in the tab layouts.

In the attached modifyed version the new tab is added with the Add button.

Be aware that once you have added a Tab you can't remove it.

Best regards.
 

Attachments

  • test1.zip
    8.7 KB · Views: 209
Upvote 0

Theera

Expert
Licensed User
Longtime User
Thank you ,Klaus
 
Upvote 0
Top