Thursday, January 23, 2014

Re: How to adjust a GWT frame height to get no scrollbars (100% of body content)?

My "main" panel my  FrameViewGwtImpl.java is a LayoutPanel. If I remove the scrollpanel  from  FrameViewGwtImpl.java and set the LayoutPanel height to e.g. 1000px, the scrollbars should appear (because this is more than the client-height) like "working_mobile_scroll.html".

Additional info: in my entrypoint I did the following:
MGWTSettings mgwtSettings = new MGWTSettings();
mgwtSettings.setPreventScrolling(false);
MGWT.applySettings(mgwtSettings);

But with this setup no scrollbars are appearing.


Am Mittwoch, 22. Januar 2014 19:51:27 UTC+1 schrieb Jens:
.) working_mobile_scroll.html
displays a normal html with an iframe and I am able to scroll everywhere on mobile browser (e.g. on Android Google Chrome)

If that works the way you want it, then its not a GWT Frame issue as the GWT Frame is just a thin wrapper around the <iframe> element. The Frame widget literally has no internal logic.

I think what breaks your experience is the MGWT ScrollPanel. If you remove it temporary from your app then it might work. If that ScrollPanel is your app's main container then an alternative would be to not use a ScrollPanel at all and instead position any header / footer using position:fixed. That way the scrolling is provided by the browser itself instead of the ScrollPanel and you still have a fixed header and footer.

-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment