How do you set the vboxContraints on a fragment th...
# tornadofx
m
How do you set the vboxContraints on a fragment that you are adding inside to a vbox?
m
The way I do it is like this
Copy code
override val root = vbox {
     val frag = MyFrag()
     frag.root.vgrow = Priority.ALWAYS
     add(frag)
}
👍 1
You can also do stuff like this:
Copy code
gridpane {
            row {
                for (fv in 0..3) {
                    with(ForecastView(controller.createForecastModel(fv))) {
                        root.gridpaneConstraints { hGrow = Priority.ALWAYS }
                        this@row.add(this)
                    }
                }
            }
        }
👍 1
m
Thanks so much, @Marshall!