Hello, I have a question regarded to TabPane comp...
# tornadofx
m
Hello, I have a question regarded to TabPane component. I have the "Main" View, which is divided into two Views, "Menu" View and "Content" View. I have TabPane in "Main" View, and I want to add a new tab from "Menu" View. I believe that this is possible, but I am quite new to TornadoFX, and I cannot find the solution. I would be grateful if someone can help me with this. :)
s
I would suggest using a workspace in tab navigation mode. That will make it easy to dock new tabs. You can put your menu view in one of the workspaces drawers or elsewhere. If you don't want to do that, you can have your menu fire an event which your view containing your tab pane is subscribed to, or better yet... As a third option, you could share a ViewModel between your Menu and Content view, which has an ObjectProperty. You can then attach a listener to this from the content view.