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
Code: 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.InvalidateEnd SubSub FlexGrid1_HeadClick(Index As Int) ' Click Header Column FlexGrid1.Selectcol(Index) ' Select all cell of columnEnd Sub The selection of the row or column you manage as in the example. While the single / multiple cell selection manages the class
Simply iOS works differently than Android. And Scrollview.Panel.Width has a different effect, so I used Scrollview.ContentWidth
I also did not know this method (but I have very little "played" with XUI). I immediately wanted to try it
I added the possibility also to edit the text inside the cell. I 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.
I did the calculation of a formula inserted in a row thanks to Erel's B4XEval class with a small change:
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. Then I have to understand whether to integrate your code in or leave it as an external class so as to be modified according to needs.
Hiys @Star-Dust Your work is excellent as usual and this looks more than seriously promising, this is great stuff...