Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DockLayoutPanel inside ScrollPanel in GWT

I'm using GWT 2.4 and I'm having a problem with setting up scrollbars for my app working correctly. When I'm trying to zoom the page - no scrollbars are now displayed for the whole page.

Currently my app is composed of DockLayoutPanel and is displayed in the following way:

private DockLayoutPanel appContainer = new DockLayoutPanel(Style.Unit.PX);
(...)
appContainer.addNorth(bannerSimplePanel, 104);
appContainer.addWest(menuSimplePanel, 200);
appContainer.add(new ScrollPanel(contentSimplePanel));

RootLayoutPanel.get().add(appContainer);

I want to have scrollbar configured for whole page instead of only "main content" (contentSimplePanel) of the page. I've tried to add scrollbar to the last step:

RootLayoutPanel.get().add(new ScrollBar(appContainer));

but it didn't work. With ScrollBar added for whole appContainer only banner is displayed on my page and the rest is black.

Thanks for any help.

like image 452
zbyszek26104 Avatar asked Sep 02 '26 00:09

zbyszek26104


1 Answers

Adding   DocklayoutPanel to a ScrollPanel won't work. The inner layout
panel's height and width will be zero. 

Use

dockLPanel.getWidgetContainerElement(flowPanel).getStyle().setOverflowY(Overflow.AUTO); 

Have a look on this

https://groups.google.com/forum/?fromgroups=#!topic/google-web-toolkit/BnboxugPuJQ

like image 60
Suresh Atta Avatar answered Sep 03 '26 14:09

Suresh Atta



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!