Table Class using TabHost

mrjaw

Active Member
Licensed User
Longtime User
Hi!
I am using a table class to use a grid with SQLite data. The idea is to use a spinner with few options so when I take a specific option create the table.
This is the code that I use to do that

B4X:
Sub spinOpciones_ItemClick (Position As Int, Value As Object)
   Dim sel As String
   sel=spinOpciones.SelectedItem
   '
   Select sel
      Case "MENU"
      
      Case "OPTION 1"
           Msgbox("Jugadas","Aviso")
            pnlTablas.Initialize("")
            Table1.Initialize(Me, "Table1", 4)
            Table1.AddToActivity(pnlTablas, 0, 20%x, 100%x, 80%y)   
            Table1.SetHeader(Array As String("Col0", "Col1", "Col2", "Col3"))
            For i = 0 To 10
               Table1.AddRow(Array As String("Row: " & i, "ccc", "ddd", "eee"))
            Next
            
                        
      Case "OPTION 2"
            Msgbox("TICKET","Aviso")
            
      Case "OPTION 3"
            Msgbox("OPTION 3","Aviso")
            
      Case "TOT"
            Msgbox("TOT","Aviso")
   End Select
   
End Sub

The problem that I cant see the table. These options are in the second tab of my TabHost

Any cluees?
 

mrjaw

Active Member
Licensed User
Longtime User
I added the pnltablas using the designer. I dont know how to add the pnltablas to second page specifically so I did it using the designer but doesnt work because doesnt see the table
 
Upvote 0
Top