cell(HtmlPanel) is not resizable in kotlin UI DSL 2
Answered
When I use HtmlPanel on its own it is resizable. When I use inside `row` dsl builder with `cell` the resulting panel is not resizable. Is it supposed behavior? Or can I somehow make it resizable?
// WHEN RESIZABLE
override fun createCenterPanel(): JComponent? {
return object : HtmlPanel() {
init {
isVisible = true
update()
}
override fun getBody() = someHtml
}
}
// WHEN NOT RESIZABLE
override fun createCenterPanel(): JComponent? {
val htmlPanel = object : HtmlPanel() {
init {
isVisible = true
update()
}
override fun getBody() = someHtml
}
return panel {
row {
cell(htmlPanel)
}
}
}
Please sign in to leave a comment.
Hi,
Try to use Cell.resizableColumn():
Hi, it does not help. The dialog is resizable only to the right, but not to the left:
But when using like this:
It works:
I also tried this:
Please try with:
I tried: the same behaviour, as in first gif
I looked a bit in the sources and if I am not mistaken, the dsl uses some grid layout that lays out cells or subgrids and it the grid itself does not support resizing the cells. So using dsl here apparently is not suitable. Correct me if I am wrong.