B4J Question Is TableView the right way of doing this?

Avon

Member
Licensed User
Longtime User
I have a tableview populated with the results of a SQLite query. Now I want to allow the user to navigate within the table view by keystrokes which correspond to key values in the query data

How can I capture the keystrokes please?
 

Avon

Member
Licensed User
Longtime User
So I add the library jGameViewHelper.jar, create an instance of the GameViewHelper object in Process_Globals,

B4X:
Private gvh As GameViewHelper

Add a key listener to the main form:

B4X:
   MainForm = Form1
   gvh.AddKeyListener("GVH", MainForm)

Declare a key up handler:

B4X:
Sub GVH_KeyReleased (KeyCode As String) As Boolean
   Log (KeyCode)
End Sub

Simples!

Thanks Erel, very nice.
 
Upvote 0
Top