I would avoid free scrolling, since there are column headers.
I do not think I understood correctlyI like this a lot. Hopefully one can add their own custom controls on the row columns? Can they?
Please post examples
Private Sub Application_Start (Nav As NavigationController)
'SetDebugAutoFlushLogs(True) 'Uncomment if program crashes before all logs are printed.
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.Color = Colors.White
NavControl.ShowPage(Page1)
Page1.RootPanel.LoadLayout("Layout1")
FlexGrid1.ColsName=Array As String("Num","Selc","Name","Img","Digit")
FlexGrid1.ColsWidth=Array As Int(75dip,50dip,100dip,60dip,150dip)
FlexGrid1.ColsType=Array As Int(FlexGrid1.TypeInt,FlexGrid1.TypeCheck,FlexGrid1.TypeString,FlexGrid1.TypeImage,FlexGrid1.TypeFloat)
FlexGrid1.ColsAlignment=Array As String("CENTER","CENTER","LEFT","LEFT","RIGHT")
Dim B As Boolean=False
For i=1 To 25
B=Not(B)
FlexGrid1.AddRow(Array As Object(i,B,"User " & i,Null,Rnd(50,10000)/100))
Next
FlexGrid1.SetCell(0,0,100)
FlexGrid1.SetCell(1,2,"User 200")
FlexGrid1.SetCell(0,3,LoadBitmap(File.DirAssets,"b4a.png"))
FlexGrid1.SetCell(2,3,LoadBitmap(File.DirAssets,"b4j.png"))
FlexGrid1.SetCell(4,3,LoadBitmap(File.DirAssets,"b4i.png"))
FlexGrid1.Invalidate
End Sub
Sub FlexGrid1_HeadClick(Index As Int) ' Click Header Column
FlexGrid1.Selectcol(Index) ' Select all cell of column
End Sub
Incorrect, I would say to keep the free scrolling but move the header left and right to match the free scrolling moving left and right nomatter what position the actually table is in.
Nice job @Star-Dust
Thanks, I had not seen this featureYou can use B4XView.ScrollViewContentWidth.
Hopefully one can add their own custom controls on the row columns? Can they?
Surely @Mashiane was asking if you can add custom views to your table (and I think it is possible).I do not think I understood correctly
You can use B4XView.ScrollViewContentWidth.
I also did not know this method (but I have very little "played" with XUI).Thanks, I had not seen this feature
You can use B4XEval for this: https://www.b4x.com/android/forum/threads/54629/#contentI am working on the reverse Polish Notation (RPN) in an attempt to add the calculation of formulas inserted into cells, similar to Excel. I hope to succeed.
Very interesting thanks. I have to study well.You can use B4XEval for this: https://www.b4x.com/android/forum/threads/54629/#content
I'm afraid there are bugs because I did not have time to try it. Today I added your code in the half-hour break, but I still have to try it.Tip: try to release early and later add more features.