How to remove Table scrollbar at horizontal direction

I had a table in my application with vaadin, the table is contained by VerticalLayout - layout1, which is added to main window.
I didn’t assign width setting on layout1. I did 70% width setting on the table, but actually it doesn’t take effect if changing to 80% or 90%.

In some low-resolution display, I see the horizontal scrollbar around the table bottom (table’s not the scrollbar of the browser) even though the screen has room at the right side. How can I remove the scrollbar, just expecting the table expand to the right side automatically as needed instead of showing a scrollbar.

Thanks.

If you want the table width to be exactly the width needed, you could try setting the widht to undefined. E.g.
table.setWidth(null)

Hi,
I believe the problem might be in the fact that you have layout1’s width undefined (according to you) and table’s width - relative. Then that’s an error in your layout.
cheers,
sasha

I’m using Vaadin 7.2 and thought it was worth sharing this.

When I created a new view and built my view in THIS ORDER:


_table.setSelectable(true);

addGeneratedTableColumns();
setTableColumnWidths();
setThemes();
setLayout();
loadData();
initListeners();


I would ALWAYS get a horizontal scroll bar the FIRST time.

Changing the order of WHEN I call setSelectable(true) call caused the Horizontal Scroll bar to VANISH.
It would only show up the FIRST TIME I loaded the view and not after.


_table.setSelectable(true);

addGeneratedTableColumns();
setTableColumnWidths();

_table.setSelectable(true);

setThemes();
setLayout();
loadData();
initListeners();

Cheers