Hello,
In B4J I would like to use the cursor keys to change the position of Panes.
See this simplified example:
https://www.b4x.com/android/forum/threads/draw-rectangular-windows-on-image.48961/#post-305781
I'm using jReflection and AddEventHandler. The problem arises when I have other controls on the form. They capture or respond to the keypress most likely before I have a chance to consume the event.
I've tried AddEventHandler, AddEventFilter, both with and without the E.consume. In every case the control that has the focus receives the key event before I get a chance process it - I hit the arrow keys and the tab changes or the next button gets selected no matter what I do.
There is another method "SetEventHandler" which is not exposed in jReflection. This method says it guarantees to be first in line. It appears to be what I want.
Is there a way to set this event handler?
Am I barking up the wrong tree and this method will accomplish what I want?
Thanks,
Barry.
In B4J I would like to use the cursor keys to change the position of Panes.
See this simplified example:
https://www.b4x.com/android/forum/threads/draw-rectangular-windows-on-image.48961/#post-305781
I'm using jReflection and AddEventHandler. The problem arises when I have other controls on the form. They capture or respond to the keypress most likely before I have a chance to consume the event.
I've tried AddEventHandler, AddEventFilter, both with and without the E.consume. In every case the control that has the focus receives the key event before I get a chance process it - I hit the arrow keys and the tab changes or the next button gets selected no matter what I do.
There is another method "SetEventHandler" which is not exposed in jReflection. This method says it guarantees to be first in line. It appears to be what I want.
Is there a way to set this event handler?
Am I barking up the wrong tree and this method will accomplish what I want?
Thanks,
Barry.