pkt1583 / gwt-ext

Automatically exported from code.google.com/p/gwt-ext
0 stars 0 forks source link

ViewPort(Panel(BorderLayout)) doesn't fit browser window on creation #367

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create the following module:
===
public class Test implements EntryPoint {
    public void onModuleLoad() {
        Panel panel = new Panel();
        panel.setLayout(new BorderLayout());

        /* Top Logo Panel */
        Panel topPanel = new Panel();
        topPanel.setHtml("");
        topPanel.setPaddings(4);
        topPanel.setBorder(false);
        topPanel.setHeight(32 + 4);
        panel.add(topPanel, new BorderLayoutData(RegionPosition.NORTH));

        TabPanel tabPanel = new TabPanel();
        tabPanel.setBorder(false);
        tabPanel.add(new GridPanel());
        panel.add(tabPanel, new BorderLayoutData(RegionPosition.CENTER));

        Panel bottomPanel = new Panel();
        bottomPanel.setHtml("blah");
        bottomPanel.setBorder(false);
        bottomPanel.setPaddings(4);
        bottomPanel.setAutoHeight(true);
        panel.add(bottomPanel, new BorderLayoutData(RegionPosition.SOUTH));

        @SuppressWarnings("unused")
        Viewport viewport = new Viewport(panel);
    }
}

===

Firefox and Safari, do not render the expected results. The right and the
bottom borders are broken.

Appending Ext.EventManager.fireResize() to the onLoad of the body tag seems
to do the trick. 

Original issue reported on code.google.com by theocharis.athanasakis@gmail.com on 9 Jul 2008 at 5:55

GoogleCodeExporter commented 8 years ago
Your code throws an exception since you use the grid. Following code is simpler 
and
reproduces the problem:
===
public class Test implements EntryPoint {

    public void onModuleLoad() {
        Panel borderPanel = new Panel();
        borderPanel.setLayout(new BorderLayout());

        Panel westPanel = new Panel();
        westPanel.setTitle("West");
        westPanel.setCollapsible(true);
        westPanel.setWidth(200);

        BorderLayoutData westData = new BorderLayoutData(RegionPosition.WEST);
        westData.setSplit(true);

        borderPanel.add(westPanel, westData);

        Panel centerPanel = new Panel();
        centerPanel.setHtml("<p>center panel</p>");

        borderPanel.add(centerPanel,new BorderLayoutData(RegionPosition.CENTER));

        Viewport viewport = new Viewport(borderPanel);  
    }
}
===

- Ext 2.0.2
- GWT-Ext 2.0.4

Its working on IE but not on FF3. The browser has to resized once and then it 
works
perfectly. 

> Appending Ext.EventManager.fireResize() to the onLoad of the body tag seems
to do the trick. 

Ext.EventManager.fireResize() does not work with the API. Could you please post 
some
working code? I know, its about sending a resize event manually, how to do that?

Original comment by jov...@gmail.com on 10 Jul 2008 at 8:29

GoogleCodeExporter commented 8 years ago
I modified the relevant HTML file to look like:

    <body onload="Ext.EventManager.fireResize()">

Unfortunately I can not contribute code without advance pemission from my
corporation's legal department. :)

Original comment by theocharis.athanasakis@gmail.com on 10 Jul 2008 at 8:49

GoogleCodeExporter commented 8 years ago
how can i add more than two panels in center Panel or other Panels.also how 
will be
add buttons,images on that panels.then how will be add panel within panel at 
run time.

Original comment by malathym...@gmail.com on 30 Jul 2008 at 6:20