Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Tree inside a Panel - no scrollbar
Hi,
I am building a custom component that allows to display some data both hierarchically and flat. The component has an option group to select whether the content should be displayed as a tree or as a flat list (ListSelect)
This component is wrapped in a panel, I have added a listener on the option group to replace the component inside the panel.
When the data is viewed as a list I have a vertical scrollbar. When it is displayed as a tree, I don't.
The Analyze Layout shows no error.
What am I missing? I am on 6.7.6
Thanks
Stéphane Nicoll: anyone?
Well if I had looked at the documentation more carefully, I would have found this myself. I had the underlying layout with setSizeFull. Fixed, sorry for the noise.
Yes there is a problem with the tree when you expand it you must repaint the panel each time you expand/minimize the panel. You do this with a ExpandListener. Check the code bellow
Here is an example (I have a HorizontalSplitPanel instead of a Panel).
tree.addListener(new ExpandListener() {
@Override
public void nodeExpand(ExpandEvent event) {
panel.requestRepaint();
}
}