Tree inside a Panel - no scrollbar


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



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() {

			public void nodeExpand(ExpandEvent event) {