vaadin TreeTable and horizontallayout

Hi all,

I’m quite new to vaadin and at the moment I’m playing around a bit with the treetable add on. So everything is working fine as long as I use just Strings for the values in the collumns. But what I want to do now is to have a picture and a string in the hirachy column of the treetable. I tried out the following approach:
When I call addContainerProperty I set Horizontallayout.class in the type parameter.
When adding the value I create a new Horizontallayout, create a new embedded of type Image and a new Label with the text. I add the Image and the Label to the layout and call the getContainerProperty(item, col).setValue(layout) method.

Now what I see is that the controll to expand the tree is above my Layout. And when I expand the tree the child entry has no margin, so it is directly under my parent → I guess this is because the layout is under the expand control.

Does anybody have an idea what I’m doing wrong?

Thank you in advance.

Best
Markus

I had the same issue with the layout appearing on different row than the > control. I added “display: inline-block;” to the style definition of my horizontal layout and now it works.

Hi,

I did just add a float: left to the v-treetable-spacer style and it worked.