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

aayush

08/24/2017, 11:30 AM
@edvin This is how I am trying
Copy code
class TabbedView : View() {

    var tabs: TabPane by singleAssign()

    override val root = hbox()

    init {
        with(root) {
            tabs = tabpane()
        }

        addTabs("Tab1",SampleTabView::class)

    }

    fun addTabs(title: String , view: View) {

        tabs.tab(title, view::class)

//        tabs.add(SampleTabView::class)
    }
}

class SampleTabView : View() {
    override val root = vbox {

        button("Button 1")
        button("Button 2")

    }

}