Is it possible to turn off arrow key
listeners in TextArea
when it has focus. I am reffering mostly to moving scrollpane with them when there is more text than space in area. I'm trying to avoid this.
Thanks for suggestion.
Is it possible to turn off arrow key
listeners in TextArea
when it has focus. I am reffering mostly to moving scrollpane with them when there is more text than space in area. I'm trying to avoid this.
Thanks for suggestion.
You could use an event filter. Filters receive events during the event capturing phase (1st, down the scene graph) of event processing, whereas handlers are triggered during the event bubbling phase (2nd, up the scene graph). Have a look at this snippet:
The
consume()
method stops further propagation of the event. As a result, no (key event) listener will be triggered. But this also disables the ability to navigate through the arrow keys—is that really what you want?EDIT: in regards to your comment, this answer states: