lundi 26 février 2018

TreeView setOnEditCommit trouble

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.




Aucun commentaire:

Enregistrer un commentaire