.CurrentTab returns the same value for each tab clicked

rleiman

Well-Known Member
Licensed User
Longtime User
Hi Everyone,

Can you look at my code and help me fix it?

.CurrentTab returns the same value for each tab clicked so I'm sure I missed something in my code that needs to be included.

B4X:
Sub tbhPagesEventHandler_TabChanged
   
   ' These will make the code easier to read.
   '-----------------------------------------
   Dim intVisitsTab As Int : intVisitsTab = 0
   Dim intMaintenanceTab As Int : intMaintenanceTab = 1

   
   ToastMessageShow(tbhPages.CurrentTab, False)


   ' Start the activity the user wants.
   '-----------------------------------
   Select tbhPages.CurrentTab
      
      Case intVisitsTab
         StartActivity("Visits")

      Case intMaintenanceTab
         StartActivity("Maintenance")
   End Select
End Sub

Thanks.
 

Attachments

  • tabhost.jpg
    tabhost.jpg
    23.7 KB · Views: 187

rleiman

Well-Known Member
Licensed User
Longtime User
Sure.

Please find the enclosed file.

Thanks.
 

Attachments

  • rleiman tabhost.zip
    24.7 KB · Views: 229
Upvote 0
Top