https://kotlinlang.org logo
#tornadofx
Title
# tornadofx
e

edvin

03/26/2017, 9:11 PM
@loloof64 TornadoFX is JavaFX, so you can use
addEventFilter
exactly the same way as in a JavaFX application. I think maybe you tried to add an event filter to a subclass of
View
? Remember,
View
holds the scene graph for the view in it's
root
variable.
root
is always a
Node
, and you can add an event filter to that or any other node inside your view. Normally you'd add an event filter while you build the UI, i.e inside the builder for the Node that you want to apply the filter to. I would recommend reading the first chapters of the guide to familiarize yourself with TornadoFX. https://github.com/edvin/tornadofx-guide/