2
votes

I'm developing a browser-based application with GWT/GXT. The html file contains a static header write in html, and a div which is fill with a ViewPort.

The ViewPort is very useful here, because it allows the auto-resizing. However, the ViewPort is always resize with the browser size, and don't consider the html header size. So I always have a part of the ViewPort hides :/

Do you know an alternative way ?

Sorry for my poor english :) Thank's

2

2 Answers

2
votes

Only have to add a style with padding:

Viewport view = new Viewport();
view.addStyleName("root");
view.setWidget(new MyWidget());
RootPanel.get().add(view);

.root{
    padding-right: 20px;
    padding-bottom: 20px;   
}
1
votes

Viewport takes the entire height and width of the browser. I see that in onAttach() method it assigns itself the height and width of the browser window.

You can consider adding the header to the view port itself.