Hi,
we are trying to come up with a solution to the following case:
- 100% of browser window used
- small resolutions work, in practice meaning that scrolling should work
- table uses all space that is available
Our current solution is to have main window with full size and a Panel inside it with full size and scrolling enabled. This requires all the layouts inside the Panel to have undefined size, which is manageable.
Now to the last requirement, 100% wide tables:
- we would like the table to take 100% of the actual width, but we can’t set that because layout doesn’t have width defined (if it had, we would lose scrolling).
- we want the table to take 100% because of lazy loading: columns are often too small after new wider data is scrolled into, and resizing adds scroll bar to the table. It’s weird to have a very narrow table with a scroll bar, even the screen would have a lot of space.
So my question is in short, how to get table taking all the extra space and allow scrolling to work at the same time?
I don’t have any idea if this is realistic at all, but one generic solution would be to allow the layout to overflow. Like:
verticalLayout.setSizeFull();
verticalLayout.allowOverflow(true); // Size is 100% unless content doesn’t fit. In that case the layout is sized as large as needed.
With this solution there wouldn’t be need to set layouts inside Panel to undefined size to get scrolling.
All ideas and comments are really appreciated!