A Tree with CheckBoxes for each leaf

Hi there,

sorry for having so many question.

But is it possible to create a Tree with Checkboxes for each leaf?
I used the search function every thread that matched my problem was a couple of years old?

It would be nice to just add a Checkbox to each leaf in the java code,
instead of utilizing css.

I use
CheckBox
as container property:

        changesTree.addContainerProperty("change", CheckBox.class,new CheckBox("", true));

But it adds a checkbox to every row, not only to the leafs.

Hi,

the short answer is this is not possible - there’s currently no way to add components to the Tree. I guess Agata is referring to TreeTable where this is indeed possible, so switch to that if it’s acceptable.

If not, I’d say there’s no easy way to do it. You might be able to hack something together with CSS, or write your own widget. I ended up doing the latter.