B4J Question [SOLVED] B4XTable Setfocus...

Magma

Expert
Licensed User
Longtime User
Hi there... (again)

Is there a way to set focus at b4xtable (not at specific row,col...) ?

For example if you open a b4xprefdialog/dialog and you wanna return at the previous state of b4xtable (just a general focus to continue navigation with keys)

tried to search how but didn't find anything... 👀
 
Last edited:

Magma

Expert
Licensed User
Longtime User
Yes it works perfect... needed a sleep(0) before... sometimes gives error (if loading/changing data)...

a tip...
When you are at other control-view (for ex. b4xfloattextfield) and you wanna setfocus to b4xtable... (you must have B4XTableSelections too)... need to .CellClicked(0, 1)

example:
B4X:
Private Sub b4xfloatextfield1_EnterPressed
....
    Sleep(0)
    B4XTable1.clvData.sv.RequestFocus
    If B4XTable1.VisibleRowIds.Get(0)>0 Then
        thistable.CellClicked(0, 1)
    End If
end sub
 
Upvote 0
Top