Hello, when I use the tableview with a column with...
# tornadofx
n
Hello, when I use the tableview with a column with
useCheckbox(false)
(for a readonly checkbox) you still can click the checkbox and get an exception (
java.lang.RuntimeException: CheckBox.selected : A bound value cannot be set.
). I was not able to find the problem in the Issues - am I doing something wrong?
Copy code
import javafx.beans.property.SimpleBooleanProperty
import javafx.collections.FXCollections
import javafx.collections.ObservableList
import tornadofx.*

class TestApp : App(TestView::class)

class TestView : View() {
    val model: ObservableList<Model> = FXCollections.observableArrayList<Model>()
    override val root = vbox {
        tableview(model) {
            column("check", Model::bool).useCheckbox(false)
        }
    }

    init {
        for (i in 1..3) {
            model.add(Model().apply { bool.value = i > 1 })
        }
    }
}

class Model {
    val bool = SimpleBooleanProperty()
}