iOS Question Table Library

fishwolf

Well-Known Member
Licensed User
Longtime User

Attachments

  • Table.png
    Table.png
    16.8 KB · Views: 299
  • Table.zip
    12.3 KB · Views: 251

fishwolf

Well-Known Member
Licensed User
Longtime User
Moved to the questions forum.

You need to call SetColumnsWidths again.

doesnt'n work, i have try to set in 3 positions

B4X:
Sub ButtonLive_Click

   Log("ButtonLive_Click")
   
    ' Test1
   Table1.SetColumnsWidths(Array As Int(200, 250, 300, 350))
   
   Table1.ClearAll

   ' Test2
   Table1.SetColumnsWidths(Array As Int(200, 250, 300, 350))
   
   For i = 0 To 100
     Table1.AddRow(Array As String("Row: " & i, "ccc", "ddd", "eee"))
   Next
    
    ' Test3
   Table1.SetColumnsWidths(Array As Int(200, 250, 300, 350))
   
End Sub
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Change Table.innerClearAll to:
B4X:
Private Sub innerClearAll(vNumberOfColumns As Int)
   SV.Panel.RemoveAllViews
   NumberOfColumns = vNumberOfColumns
   SV.ContentHeight = 0
   SelectedRow = -1
   minVisibleRow = -1
   maxVisibleRow = 0
   Data.Initialize
   LabelsCache.Initialize
   visibleRows.Initialize
   SV.ScrollOffsetY = 0
   For i = 1 To 80 'fill the cache to avoid delay on the first touch
     LabelsCache.Add(CreateNewLabels)
   Next
   If cVisible Then
     SV.ScrollOffsetX = 0
     SV.ScrollOffsetY = 0
   End If
End Sub
 
Upvote 0

fishwolf

Well-Known Member
Licensed User
Longtime User
sorry, i have discovery that with this function, the columns problem is resolved,

but when is scrool down the table, it don't show immediately the new rows, it's show a hole of rows.
 
Upvote 0

fishwolf

Well-Known Member
Licensed User
Longtime User
The problem is in the modifications done to the Table class. I switched to the unmodified Table class and it works properly.

i know, you have suggest the modifications (new innerClearAll) for resolve the initial bug on alignement from title and rows columns
Table.png
 
Upvote 0
Top