https://kotlinlang.org logo
u

ushort

09/23/2020, 7:17 PM
Created a view with specified size using
Copy code
override fun createPrimaryScene(view: UIComponent) = Scene(view.root, 800.0, 600.0)
and was wondering how to get the tab pane and other nodes in that view to resize accordingly. The tab pane should grow vertically but its still stuck at a height around 240
m

Marshall

09/23/2020, 10:30 PM
In the view you will need to do something like
Copy code
override val root = vbox {
    tabpane {
        vgrow = Priority.ALWAYS
    }
}
u

ushort

09/24/2020, 4:52 PM
Had that however problem still persists
Copy code
tabpane {
    vgrow = Priority.ALWAYS
    side = Side.LEFT
    tab("Example")
}
Results in
One solution would be to set prefHeight of tabpane to 600.0 but doesn't seem like proper way to handle scaling of components.
2 Views