Thanks! The enableScrolling(false) permanently eliminated the scroll bar. I pressed Refresh again and again without seeing the scrollbar appear. Even if I purposely set the panel size greater than the window size. It also fixes the compiled version. Perfect solution for me!
It's interesting that enableScrolling(true) does not have the opposite effect. That still produces a randomly appearing scrollbar but that's not a concern for me at this time. John On Fri, Jan 30, 2009 at 12:28 AM, Jason Morris <[email protected]> wrote: > > Have you tried: > > Window.setMargin("0"); > Window.enableScrolling(false); > > Which will remove the default padding the browser puts around the document, > and disables scrolling > of the document as well (ScrollPanel's will still work though ;) ) > > Hope that helps > //J > > JohnMudd wrote: >> The following code produces a vertical scroll bar (on the right side) >> even though the panel size doesn't exceed the window size. I'm using >> ver 1.5.3 in shell mode. >> >> The scroll bar does not always appear. If I press Refresh repeatedly >> then I will see the scroll bar come and go. There's some randomness >> to this problem. >> >> The scroll bar appears even when I reduce the root window size from >> 100% height to 95% height. At 94% height I still see the root width >> toggle randomly but the scroll bar does not appear. Down around 90% >> height there is no problem. >> >> The layout also has problems in compile mode with Firefox 3 also. But >> after about 5 refreshes the problems go away and I get an accurate >> layout. >> >> Is this a known problem? >> >> John >> >> >> >> package com.mudd.client; >> >> import com.google.gwt.core.client.*; >> import com.google.gwt.user.client.ui.*; >> import com.google.gwt.user.client.*; >> >> public class panelSizeDemo implements EntryPoint { >> >> public void onModuleLoad() { >> try { >> main(); >> } >> catch (Exception e) { >> Window.alert("General Error:\n" + e); >> } >> } >> >> static RootPanel rootPanel = RootPanel.get(); >> static HorizontalPanel basePanel = new HorizontalPanel(); >> >> public void main() { >> rootPanel.setSize("100%", "100%"); // Even if h=100.0% or as low >> as 95% >> rootPanel.add(basePanel); >> basePanel.setBorderWidth(30); >> basePanel.setSize("100%", "100%"); >> basePanel.add(new Label("root: " + rootPanel.getOffsetWidth()+ >> "," + rootPanel.getOffsetHeight())); >> } >> } >> >> > >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
