PDA

View Full Version : [OPEN] Layout Bug



joshb
24 Jun 2009, 10:40 AM
Using GXT from SVN, Mac, Hosted Mode / FF

Add a content Panel, with FitLayout, TopComponent, and Buttons to a window using fitlayout. Doesn't render properly. Resizing the Window makes it render correctly (somewhere, some event is firing). Needless to say, this drives me crazy,

Sample code:


public class T1 implements EntryPoint {

public void onModuleLoad() {



Window window = new Window();
window.setSize(500,500);

TestLayout2 tpt = new TestLayout2();
window.setLayout( new FitLayout() );
window.add(tpt);
window.show();
}



public class TestLayout2 extends ContentPanel {

public TestLayout2() {

ContentPanel p = new ContentPanel();

HtmlContainer header = new HtmlContainer("<div><h1>Title</h1></div>" );

p.setTopComponent(header);

Button b1 = new Button("First");

p.addButton(b1);

setLayout( new FitLayout() );

HtmlContainer content = new HtmlContainer( "This is some text for some content");

p.add( content );

setLayout( new FitLayout() );
add( p );

}
}
}

sven
24 Jun 2009, 10:47 AM
Renders fine for me. Are you sure that you use the latest revision? What gets rendered wrong for you?

joshb
24 Jun 2009, 10:59 AM
Sven,

It works in FF, not in Safari (Mac, I assume also Windows). Sorry I got it wrong.