TreeView setOnEditCommit trouble

时间:2018-02-26 17:36:39

标签: java javafx checkbox treeview cell

I've got some problems with setOnEditCommit TreeView method. So here's my code

public class MyCheckBoxTreeViewConsulter extends TreeView {

public MyCheckBoxTreeViewConsulter() {
    super();
    this.setEditable(true);

    this.setCellFactory(CheckBoxTreeCell.<ChampBdd>forTreeView());

        this.setOnEditCommit(e -> {
            System.out.println("hi");
        });
}}

I have a result like this

https://imgur.com/a/zQmwH

Whenever I double click on one of theses row, nothing happens.

I want this kind of result to edit data

https://imgur.com/a/0rJ8F

Any thoughts on this ?

Feel free to ask more of my code if you need it.

0 个答案:

没有答案