Hello there, I want to create a view containing (a...
# tornadofx
t
Hello there, I want to create a view containing (among other things) a progress bar in a GridPane. I don't want this progress bar to shrink in height if the window's height is reduced. I have tried
vGrow = Priority.NEVER
, but that didn't change anything.
Copy code
class ProgressBarView : View() {

    override val root = gridpane {
        row {
            progressbar {
                gridpaneConstraints {
                    margin = Insets(10.0, 10.0, 5.0, 10.0)
                    useMaxWidth = true
                }
            }
        }
        constraintsForColumn(0).percentWidth = 100.0
    }
}
I guess I could explicitly set the minimum height using
minHeight = some_number
, but I'd like to avoid having to deal with absolute height values. Is there any other way? Thanks in advance 🙂
l
Maybe you can use minHeight = USE_COMPUTED_SIZE. I don't know if this works with TornadoFX, but when you do this on FXML, it will keep the minimum size equal to the size of the first rendering.
t
@Luigi Scarminio Thank you for the reply. Didn't come to test it out until now, I'm sorry. Sadly, it doesn't work: The scrollbar still vertically shrinks.