https://kotlinlang.org logo
Title
k

Kaj Koivunen

01/15/2023, 8:33 PM
tv.selectionModel.selectedItemProperty().addListener(fun(obs, oldSelection, newSelection) {
    if (newSelection != null) {
        val row: Int = tv.selectionModel.selectedCells[0].row
        val col = tv.columns[tv.selectionModel.selectedCells[0].column]
        Platform.runLater { tv.edit(row, col) }
    }
appears to work for selecting cells with single click but I have no clue how I'd make it commit edits on focus loss or allow movement between cells using key combinations, as enter boots the focus to the parent element