A Alex_197 Well-Known Member Licensed User Longtime User Jun 10, 2025 #1 Hi all I have a question. I have a TabHost added with designer. My code adds tabs with icons. My question is - is it possible to clear or remove all the tabs before adding the new one? For example - my code adds 7 tabs for each day of week for a client. Each client has a different schedule - if the client has a schedule for Monday tab icon has a blue background, if not - grey and so on. So I need to clear all the previously added tabs before adding the new 7 tabs.
Hi all I have a question. I have a TabHost added with designer. My code adds tabs with icons. My question is - is it possible to clear or remove all the tabs before adding the new one? For example - my code adds 7 tabs for each day of week for a client. Each client has a different schedule - if the client has a schedule for Monday tab icon has a blue background, if not - grey and so on. So I need to clear all the previously added tabs before adding the new 7 tabs.
peacemaker Expert Licensed User Longtime User Jun 10, 2025 #2 Seems, possible just to create and re-create by code. TabHost change Tab Color Hello Guys, I have a Problem, i have an TabHost with 2 Tabs , how can i change the color of the tab, white is dosent fit in, in the design :) Greetings Alexander Stolte www.b4x.com TabHostExtras Here is a new library i have created that allows you to customise a TabHost. TabHostExtras Version: 2.2 TabHostExtras Methods: GetTagWidget (TabHost1 As TabHost) As TabWidget Returns TabHost1's TabWidget. Allowing you to customize various settings. getTabContentViewPadding (tabHost1 As... www.b4x.com Last edited: Jun 10, 2025 Upvote 0
Seems, possible just to create and re-create by code. TabHost change Tab Color Hello Guys, I have a Problem, i have an TabHost with 2 Tabs , how can i change the color of the tab, white is dosent fit in, in the design :) Greetings Alexander Stolte www.b4x.com TabHostExtras Here is a new library i have created that allows you to customise a TabHost. TabHostExtras Version: 2.2 TabHostExtras Methods: GetTagWidget (TabHost1 As TabHost) As TabWidget Returns TabHost1's TabWidget. Allowing you to customize various settings. getTabContentViewPadding (tabHost1 As... www.b4x.com
peacemaker Expert Licensed User Longtime User Jun 10, 2025 #3 Removing is possible, but ... it's wrong way to use it after removing tab. B4X: Dim jo As JavaObject = TabHost1 Dim jo1 As JavaObject = jo.RunMethodJO("getTabWidget", Null) jo1.RunMethodJO("removeViewAt", Array (index)) Attachments testt.zip testt.zip 9.2 KB · Views: 365 Upvote 0
Removing is possible, but ... it's wrong way to use it after removing tab. B4X: Dim jo As JavaObject = TabHost1 Dim jo1 As JavaObject = jo.RunMethodJO("getTabWidget", Null) jo1.RunMethodJO("removeViewAt", Array (index))