B4J Question How to make the pagination table automatically change to the next page?

Milton Yong

New Member
My pagination table has 4 pages, but it needs to be manually change to the next page.
I would like to ask if it is possible to make it automatically change to the next page every 3 seconds?
 

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
use a timer

B4X:
private tm as timer 'in class globals
private tb as b4xtable

tm.initalize("pageflip",3000) ' in b4xpages_created

tm.enabled = true ' when you have created the table and populated


private sub pageflip_tick
    if (tb.isinitialized) then
        tb.currentpage = min(tb.currentpage+1,3)
'or
       tb.currentpage = (tb.currentpage+1 ) mod 4 ' to cycle through the pages
    end if
end sub
 
Upvote 1
Top