GMan Well-Known Member Licensed User Longtime User Friday at 7:24 PM #1 I am using this lib from @Alexander Stolte : https://www.b4x.com/android/forum/threads/b4x-xui-as-segmentedtab.126563/page-1#posts I added a new tab at runtime: Code: Copy ASSegmentedTab3.AddTab("Chart",Null) How can i remove it at runtime - tried this but throws an error: 1. Code: Copy ASSegmentedTab3.RemoveTab("Chart") ASSegmentedTab3.RefreshTabs 2. Code: Copy ASSegmentedTab3.RemoveTab2("Chart") ASSegmentedTab3.RefreshTabs Here the error in the IDE: (NumberFormatException) java.lang.NumberFormatException: For input string: "Chart" Click to expand...
I am using this lib from @Alexander Stolte : https://www.b4x.com/android/forum/threads/b4x-xui-as-segmentedtab.126563/page-1#posts I added a new tab at runtime: Code: Copy ASSegmentedTab3.AddTab("Chart",Null) How can i remove it at runtime - tried this but throws an error: 1. Code: Copy ASSegmentedTab3.RemoveTab("Chart") ASSegmentedTab3.RefreshTabs 2. Code: Copy ASSegmentedTab3.RemoveTab2("Chart") ASSegmentedTab3.RefreshTabs Here the error in the IDE: (NumberFormatException) java.lang.NumberFormatException: For input string: "Chart" Click to expand...
Knoppi Active Member Licensed User Longtime User Friday at 9:07 PM #2 use: AddTab2 (Text As String, icon As B4XBitmap, Value As Object) As ASSegmentedTab_Tab and RemoveTab2 (Value As Object) set the value to "Chart" Code: Copy ASSegmentedTab3.AddTab2("Chart",Null,"Chart") ASSegmentedTab3.RemoveTab2("Chart") ASSegmentedTab3.RefreshTabs Upvote 0
use: AddTab2 (Text As String, icon As B4XBitmap, Value As Object) As ASSegmentedTab_Tab and RemoveTab2 (Value As Object) set the value to "Chart" Code: Copy ASSegmentedTab3.AddTab2("Chart",Null,"Chart") ASSegmentedTab3.RemoveTab2("Chart") ASSegmentedTab3.RefreshTabs
GMan Well-Known Member Licensed User Longtime User Friday at 9:16 PM #3 Causes the same error (tried this before,too): Code: Copy assegmentedtab_tabclick (java line: 1410) java.lang.RuntimeException: Object should first be initialized (View). Last edited: Friday at 9:27 PM Upvote 0
Causes the same error (tried this before,too): Code: Copy assegmentedtab_tabclick (java line: 1410) java.lang.RuntimeException: Object should first be initialized (View).
teddybear Well-Known Member Licensed User Saturday at 1:46 AM #4 GMan said: Causes the same error (tried this before,too): Code: Copy assegmentedtab_tabclick (java line: 1410) java.lang.RuntimeException: Object should first be initialized (View). Click to expand... AddTab, and RemoveTab is done by index — which index does the "Chart" tab correspond to? B4X: Copy ASSegmentedTab3.RemoveTab(YourTabIndex) '0...n? ASSegmentedTab3.RefreshTabs AddTab2, and RemoveTab2 is done by value. Do that as Knoppi said at post#2 Upvote 0
GMan said: Causes the same error (tried this before,too): Code: Copy assegmentedtab_tabclick (java line: 1410) java.lang.RuntimeException: Object should first be initialized (View). Click to expand... AddTab, and RemoveTab is done by index — which index does the "Chart" tab correspond to? B4X: Copy ASSegmentedTab3.RemoveTab(YourTabIndex) '0...n? ASSegmentedTab3.RefreshTabs AddTab2, and RemoveTab2 is done by value. Do that as Knoppi said at post#2
teddybear Well-Known Member Licensed User Saturday at 11:29 AM #6 GMan said: See post#3 Click to expand... This error seems to occur when you click a tab. Where or how did you remove the tab? Upvote 0
GMan said: See post#3 Click to expand... This error seems to occur when you click a tab. Where or how did you remove the tab?
Knoppi Active Member Licensed User Longtime User Yesterday at 8:11 AM #7 I downloaded the example and added two buttons for ADD and REMOVE. It works for me. teddybear said: This error seems to occur when you click a tab. Where or how did you remove the tab? Click to expand... Attachments AS SegmentedTab Example2.zip AS SegmentedTab Example2.zip 3.8 KB · Views: 5 Upvote 0
I downloaded the example and added two buttons for ADD and REMOVE. It works for me. teddybear said: This error seems to occur when you click a tab. Where or how did you remove the tab? Click to expand...
teddybear Well-Known Member Licensed User Yesterday at 1:41 PM #8 Knoppi said: I downloaded the example and added two buttons for ADD and REMOVE. It works for me. Click to expand... Using Buttons to add and remove a tab without issue. so I asked how he removed the tab. Upvote 0
Knoppi said: I downloaded the example and added two buttons for ADD and REMOVE. It works for me. Click to expand... Using Buttons to add and remove a tab without issue. so I asked how he removed the tab.