Magma Expert Licensed User Longtime User Feb 9, 2022 #1 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: Feb 9, 2022
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... ?
Erel B4X founder Staff member Licensed User Longtime User Feb 9, 2022 #2 Are you using this solution: https://www.b4x.com/android/forum/threads/b4xtable-keyboard-navigation.135625/#content ? Upvote 0
Are you using this solution: https://www.b4x.com/android/forum/threads/b4xtable-keyboard-navigation.135625/#content ?
Erel B4X founder Staff member Licensed User Longtime User Feb 10, 2022 #4 This is important information... Code: Copy B4XTable1.clvData.sv.RequestFocus Upvote 1
Magma Expert Licensed User Longtime User Feb 10, 2022 #5 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: Code: Copy 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
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: Code: Copy 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