You can add an OnScroll event to a node with JavaObject:
B4X:Sub Process_Globals Private fx As JFX Private MainForm As Form End Sub Sub AppStart (Form1 As Form, Args() As String) MainForm = Form1 MainForm.Show Dim jo As JavaObject = MainForm.RootPane Dim e As Object = jo.CreateEventFromUI("javafx.event.EventHandler", "scroll", Null) jo.RunMethod("setOnScroll", Array(e)) End Sub Sub Scroll_Event (MethodName As String, Args() As Object) As Object Dim scrollevent As JavaObject = args(0) Log(scrollevent.RunMethod("getDeltaY", Null)) Return Null End Sub
Hi Erel,
I have a ListView named "Clipboard".
How can I use the mouse wheel to scroll through (and auto-select) the items?
I've tried:
B4X:
Sub ClipboardView_OnScroll
...
End Sub