cklester Well-Known Member Licensed User Nov 25, 2021 #1 Is there a way to put the number of pages in the B4XTable pager controls, so it shows Current/Total? I searched the forum and couldn't find anything about it.
Is there a way to put the number of pages in the B4XTable pager controls, so it shows Current/Total? I searched the forum and couldn't find anything about it.
William Lancee Well-Known Member Licensed User Longtime User Nov 25, 2021 #2 I looked at B4XTable.bas. Untested, but ... B4X: Table1.lblNumber.text = Table1.GetCurrentPage & "/" Ceil(Table1.GetSize / Table1.GetRowsPerpage) If it doesn't work, take a look yourself. Unzip B4XTable.B4Xlib in C:\Program Files (x86)\Anywhere Software\B4J\Libraries Upvote 0
I looked at B4XTable.bas. Untested, but ... B4X: Table1.lblNumber.text = Table1.GetCurrentPage & "/" Ceil(Table1.GetSize / Table1.GetRowsPerpage) If it doesn't work, take a look yourself. Unzip B4XTable.B4Xlib in C:\Program Files (x86)\Anywhere Software\B4J\Libraries
William Lancee Well-Known Member Licensed User Longtime User Nov 25, 2021 #4 The .Get... are class 'getters' and you can omit the Get part. It works both ways. You do need to leave some room for both numbers, they may be large. Place the code in B4XTable1_DataUpdated B4X: B4XTable1.lblNumber.left = 40dip B4XTable1.lblNumber.Width = 100dip B4XTable1.lblNumber.TextSize = 18 B4XTable1.lblNumber.Text = B4XTable1.CurrentPage & "/" & Ceil((B4XTable1.Size / B4XTable1.RowsPerPage)) Upvote 0
The .Get... are class 'getters' and you can omit the Get part. It works both ways. You do need to leave some room for both numbers, they may be large. Place the code in B4XTable1_DataUpdated B4X: B4XTable1.lblNumber.left = 40dip B4XTable1.lblNumber.Width = 100dip B4XTable1.lblNumber.TextSize = 18 B4XTable1.lblNumber.Text = B4XTable1.CurrentPage & "/" & Ceil((B4XTable1.Size / B4XTable1.RowsPerPage))