Dallasphillips24
01/28/2020, 9:10 PMprivate val accountView: AccountView by inject()
private val dataView: DataView by inject()
The parent view that these are injected to has a root of gridpane. I add the views in this way to the pane:
with(root) {
useMaxWidth = true
hgrow = Priority.ALWAYS
constraintsForColumn(0).apply {
hgrow = Priority.ALWAYS
}
constraintsForColumn(1).apply {
hgrow = Priority.ALWAYS
}
add(accountView.apply {
gridpaneConstraints {
columnRowIndex(0, 0)
}
})
add(dataView.apply {
gridpaneConstraints {
columnRowIndex(1, 0)
}
})
}
What ends up happening is that the views are displayed stacked on one another and do not abide the column constraint the way I expected (each column taking up half the pane). The only way I have gotten it to work the way I expect is via adding a row builder surrounding the add(view)'s. Is there something I am doing obviously wrong?