Make HorizontalSplitPanel adjust its width to content- in Vaadin 7
I am using Vaadin 7 rc1.
I would like to create a HorizontalSplitPanel that adjusts its width if the left side is wider then the given width. The default behaviour is that a scrollbar appears on at the bottom of the screen if the content is wider then the given size. However I would like to have the left side widened.
I am new to Vaadin and the book does not go into details like this. How is this possible in Vaadin 7? Any help is appreciated!
Try to call method setSizeFull() on the HorizontalSplitPanel.
Then open the application in e.g. Chrome and Inspect the split panel element. See what has been changed and try to play with width/height values in the inspector. That might give you a clue what is wrong. Maybe you need to call setSizeFull() also on components that are contained in split panel?
The is a function in HorizontalSplitPanel that do exactly what you looking for :
panel.setSplitPosition(float f, Unit unit);
You can use either
... there is a lot of possibilities.
I have managed to solve the situation with other layout structure.