LucaMs Expert Licensed User Longtime User Oct 30, 2022 #1 I fill a B4XTable with 100 "records" (I'm attaching a test project, in which they are not DB records), 10 records / page. If I press ">", next page to the end, everything is ok and the navigation keys for subsequent records are correctly disabled. If on the first "page" I press on "> |", last page, the B4XTable shows me an enon-existent eleventh page, with the hundredth "record". Attachments B4XTableTest.zip B4XTableTest.zip 2.8 KB · Views: 422 Last edited: Oct 30, 2022
I fill a B4XTable with 100 "records" (I'm attaching a test project, in which they are not DB records), 10 records / page. If I press ">", next page to the end, everything is ok and the navigation keys for subsequent records are correctly disabled. If on the first "page" I press on "> |", last page, the B4XTable shows me an enon-existent eleventh page, with the hundredth "record".
Erel B4X founder Staff member Licensed User Longtime User Oct 30, 2022 #2 Tip: 1. Make the table anchored to all sides. 2. Set the minimum width instead of the size of each column: Code: Copy xTable.MinimumWidth = 40 For i = 0 To 6 xTable.AddColumn("COL" & i, xTable.COLUMN_TYPE_NUMBERS) Next 3. It is indeed a bug. I'll release a fix... Upvote 0
Tip: 1. Make the table anchored to all sides. 2. Set the minimum width instead of the size of each column: Code: Copy xTable.MinimumWidth = 40 For i = 0 To 6 xTable.AddColumn("COL" & i, xTable.COLUMN_TYPE_NUMBERS) Next 3. It is indeed a bug. I'll release a fix...
LucaMs Expert Licensed User Longtime User Oct 30, 2022 #3 Erel said: 1. Make the table anchored to all sides. 2. Set the minimum width instead of the size of each column: Click to expand... It was just a demonstration Upvote 0
Erel said: 1. Make the table anchored to all sides. 2. Set the minimum width instead of the size of each column: Click to expand... It was just a demonstration
teddybear Well-Known Member Licensed User Oct 30, 2022 #4 B4XTable lblLast_Click add mCurrentCount Mod mRowsPerPage = 0 test B4X: Copy Private Sub lblLast_Click If lblLast.Tag = False Then Return If mCurrentCount Mod mRowsPerPage = 0 Then setFirstRowIndex(mCurrentCount - mRowsPerPage) Return End If setFirstRowIndex (Floor(mCurrentCount / mRowsPerPage) * mRowsPerPage) End Sub Upvote 0
B4XTable lblLast_Click add mCurrentCount Mod mRowsPerPage = 0 test B4X: Copy Private Sub lblLast_Click If lblLast.Tag = False Then Return If mCurrentCount Mod mRowsPerPage = 0 Then setFirstRowIndex(mCurrentCount - mRowsPerPage) Return End If setFirstRowIndex (Floor(mCurrentCount / mRowsPerPage) * mRowsPerPage) End Sub
Erel B4X founder Staff member Licensed User Longtime User Oct 30, 2022 #5 This is the updated code: Code: Copy Private Sub lblLast_Click If lblLast.Tag = False Then Return Dim NumberOfPages As Int = Ceil(mCurrentCount / mRowsPerPage) setFirstRowIndex ((NumberOfPages - 1) * mRowsPerPage) End Sub Upvote 0
This is the updated code: Code: Copy Private Sub lblLast_Click If lblLast.Tag = False Then Return Dim NumberOfPages As Int = Ceil(mCurrentCount / mRowsPerPage) setFirstRowIndex ((NumberOfPages - 1) * mRowsPerPage) End Sub
LucaMs Expert Licensed User Longtime User Oct 31, 2022 #6 I could not understand why the project (a test) attached to the first post and that I am attaching here, continues to not work as it should. I also attach the same project but with the source of the B4XLib and this one works! Attachments NotWork.zip NotWork.zip 2.8 KB · Views: 408 Works.zip Works.zip 12.6 KB · Views: 433 Upvote 0
I could not understand why the project (a test) attached to the first post and that I am attaching here, continues to not work as it should. I also attach the same project but with the source of the B4XLib and this one works!
teddybear Well-Known Member Licensed User Oct 31, 2022 #7 LucaMs said: I could not understand why the project (a test) attached to the first post and that I am attaching here, continues to not work as it should. I also attach the same project but with the source of the B4XLib and this one works! Click to expand... Maybe your internal b4xtable.b4xlib doesn't be updated. I have tested 2 projects you posted, Both of them work, if you replace b4xtable.bas from works.zip in your b4xtable.b4xlib. Last edited: Oct 31, 2022 Upvote 0
LucaMs said: I could not understand why the project (a test) attached to the first post and that I am attaching here, continues to not work as it should. I also attach the same project but with the source of the B4XLib and this one works! Click to expand... Maybe your internal b4xtable.b4xlib doesn't be updated. I have tested 2 projects you posted, Both of them work, if you replace b4xtable.bas from works.zip in your b4xtable.b4xlib.
LucaMs Expert Licensed User Longtime User Oct 31, 2022 #8 teddybear said: Maybe your internal b4xtable.b4xlib doesn't update. Click to expand... I had put the new library among the additional ones but there is an older copy in the internal ones. Now it's ok, thanks. Upvote 0
teddybear said: Maybe your internal b4xtable.b4xlib doesn't update. Click to expand... I had put the new library among the additional ones but there is an older copy in the internal ones. Now it's ok, thanks.