how can I check if the view is active or replaced ...
# tornadofx
c
how can I check if the view is active or replaced with another? Is there any built-in option?
r
If you're trying to check your App's state by checking what is visible, that's rather backwards. You should have some sort of state that you use to control what is visible.
👍 1
c
i think it's best to track this too. there are pure UI tricks if you have a StackPane or TabPane container, but I think what you really want is something like "activeView".
i put something like this in a NavigationController
👍 1