View Full Version : Web browser scrolling
28 Dec 2010, 12:47 PM
I have a page that is longer than the browser window. For some reason the browser does not render vertical scroll bars to allow me to scroll to the bottom of the rendered page?
The GXT code contains a Viewport, with a fair number of nested panels (including tabs). I have set setEnableScroll(true) on the Viewport than contains all the child panels, but still no scroll bars.
Do I have to enable scroll bars programmatically (calculate the size of the rendered panels vs. the browser window) or is there some way I can set the Viewport to take care the rendering of the scroll bars if the browser window is smaller than the rendered content?
Thanks in advance for the advice.
28 Dec 2010, 2:37 PM
From Viewport javadoc:
LayoutContainer that fills the browser window and monitors window resizing.
Viewports are best used for applications that will fill the browser without
window scrolling. Children of the viewport can allow scrolling.
28 Dec 2010, 3:40 PM
Ack, my mistake - I should have read that. Thanks for the information.
So, then, all the container are now wrapped by a ContentPanel, with scroll mode set to auto. Still no scroll bars. In the code attached below, ConterPanel contains a number of other containers, including multiple TabPanels.
Thanks again for any advise.
public vod onModuleLoad()
TwebViewport viewport = new TwebViewport();
RootPanel rootPanel = RootPanel.get();
public class TwebViewport extends Viewport
baseStyle = "client-twebviewport";
// setSize(1000, 1000);
VBoxLayout vbLayout = new VBoxLayout();
// FitLayout layout = new FitLayout();
ContentPanel masterPanel = new ContentPanel();
HtmlContainer headerHTML = new HtmlContainer();
String headerURL = GWT.getHostPageBaseURL() + "includes/header.html";
// The body
CenterPanel centerPanel = new CenterPanel();
HtmlContainer footerHTML = new HtmlContainer();
String footerURL = GWT.getHostPageBaseURL() + "includes/footer.html";
// Add it to the master panel
3 Jan 2011, 12:07 AM
To be able to give good advice on what panels and layouts you should use it would be good if you could provide a mockup screenshot of what you want to achive.
7 Jan 2011, 2:30 PM
To conclude this thread - my questions was answered by this thread that I found after more searching:
Powered by vBulletin® Version 4.1.5 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.