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!

Thanks!

Answers


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

Unit.PERCENTAGE

or

Unit.PX

... there is a lot of possibilities.


I have managed to solve the situation with other layout structure.


Need Your Help

PHP CLI doesn't use stderr to output errors

stdout stderr php nstask

I'm running the PHP CLI through a NSTask in MacOS, but this question is more about the CLI itself.

Spell Check in Emacs on Mac

osx emacs spell-checking ispell

I am not able to use Spell-Check in the Emacs on my Mac. I copied the .emacs file I had on my previous Fedora to my home folder in my Macbook. The ".emacs" has a line saying:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.