Loading...
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.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

How to create a HORIZONTAL Scrollbar in a Layout?????????

Tommy Stenberg
1 decade ago Jan 07, 2010 4:42pm
Jens Jansson
1 decade ago Jan 07, 2010 5:42pm
Tommy Stenberg
1 decade ago Jan 07, 2010 6:54pm
Artur Signell
1 decade ago Jan 07, 2010 7:15pm

Tommy Stenberg: panel.setSizeFull();
HorizontalLayout hl = new HorizontalLayout();
panel.addComponent(hl);

A quite common Vaadin gotcha. A Panel by default contains a VerticalLayout (width: 100%) which will prevent this from working. Replace this verticallayout by your horizontallayout using panel.setContent(hl); instead of panel.addComponent(hl). Another option is to make sure the verticallayout is undefined wide (i.e. will grow with content) by saying panel.getContent().setSizeUndefined() but then you will have an unnecessary layout in your application.

Tommy Stenberg
1 decade ago Jan 07, 2010 7:48pm
Brad Grant
1 decade ago Feb 09, 2010 10:03pm
Ashish Shambharkar
1 decade ago Jul 28, 2011 6:00pm
Henri Sara
1 decade ago Jul 29, 2011 5:45am
Hisham Javed
10 years ago Sep 26, 2011 3:34pm
stephen machin
9 years ago Apr 24, 2012 9:21am
simon boh
9 years ago May 23, 2012 3:20pm
Shipra Patel
8 years ago Jan 22, 2014 10:08am
Shipra Patel
8 years ago Jan 22, 2014 10:09am
Marius Reinwald
8 years ago Jan 22, 2014 10:36am