This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information

--Remove default padding of work-screen

Information about development with ProjX.

--Remove default padding of work-screen

Postby Development@SIB » Fri Oct 28, 2016 1:25 pm

This article is outdated - please use our new system at

The standard application frame with Vaadin UI adds a default padding of 5 pixels to every screen if margins of screen layout are smaller than 5 pixels.

An example:

screen_defaultpadding.png (47.32 KiB) Viewed 895 times

and the html code:

screen_defaultpadding_html.png (44.84 KiB) Viewed 895 times

To change the default padding, simply set a custom margin in your screen, e.g.

Code: Select all
getLayout().setMargins(new UIInsets(8, 8, 8, 8));

or set/add the style:

Code: Select all
setStyle(new Style("nopadding"));

to remove the default padding.

Here's the result without default padding:

screen_nopadding.png (38.92 KiB) Viewed 895 times

The default padding of the screen is now unset, but the users layout has custom margins:

Code: Select all
layUsers.setMargins(7, 2, 5, 5);
User avatar
Posts: 321
Joined: Mon Sep 28, 2009 1:54 pm

Return to Documentation