gridpaneConstraints works not correctly
liugangnhm opened this issue · comments
jacky liu commented
class GridConstrainTestView : View() {
override val root = gridpane {
prefHeight = 600.0
prefWidth = 600.0
row {
button("1")
button("2")
button("3")
button("4")
}
row {
button("11111111") {
gridpaneConstraints {
columnSpan = 2
}
}
}
}
}
the row 2 column 1 works fine,
but if we add more than 1 columns, gridpaneConstraints works not well
{
override val root = gridpane {
prefHeight = 600.0
prefWidth = 600.0
row {
button("1")
button("2")
button("3")
button("4")
}
row {
button("11111111") {
gridpaneConstraints {
columnSpan = 2
}
}
button("22222222222222222") {
gridpaneConstraints {
columnIndex = 2
columnSpan = 2
}
}
}
}
}
Funtik commented
you add the button to the second column (in order), you also need to specify in which column to install the button
jacky liu commented
you add the button to the second column (in order), you also need to specify in which column to install the button
i had added columnIndex = 2
and it did not work
Funtik commented
@liugangnhm I will test the code later. for now just turn on the lines in the grid