PDA

View Full Version : GXT CenterLayout Doesn't work



ITS_luka
20 Feb 2012, 2:45 AM
when I do everything like said here: http://www.sencha.com/examples/pages/layouts/centerlayout.html
(http://www.sencha.com/examples/pages/layouts/centerlayout.html)I get this.
31932
what to do? :))

ITS_luka
20 Feb 2012, 2:47 AM
oh.. here is the code:

LayoutContainer lc = new LayoutContainer(); lc.setLayout(new CenterLayout());

ContentPanel panel = new ContentPanel();
panel.setBodyStyle("padding: 6px");
panel.setFrame(true);
panel.setHeading("CenterLayout");
panel.addText("I should be centered");
panel.setWidth(200);

lc.add(panel);

RootPanel.get().add(lc);

sven
20 Feb 2012, 2:51 AM
You have not set a size on your LayoutContainer. This is required.

ITS_luka
20 Feb 2012, 4:47 AM
:) thank you