PDA

View Full Version : [CLOSED BETA 2] BorderLayout



nseb
30 Apr 2008, 12:40 AM
Hi,

I have a big problem with collapsed panel , with borderlayout. The panel's title , see the picture here (http://www.uploadgeek.com/uploads456/0/gxt.png)

here the code :


viewport = new Viewport();
viewport.setLayout(new BorderLayout());

center = new ContentPanel();
center.setHeaderVisible(false);
center.setBorders(false);
center.setLayout(new FillLayout());

Image image = new Image();
image.setUrl("http://www.techcrunch.com/wp-content/wix_shot1.png");
image.addLoadListener(new LoadListener() {

public void onError(Widget arg0) {
}

public void onLoad(Widget arg0) {
Window.alert("ok");
}
});

image.setSize("200px", "200px");
center.add(image);

BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
centerData.margins = new Margins(0, 0, 5, 0);
center.setData(centerData);


BorderLayoutData data = new BorderLayoutData(LayoutRegion.WEST, 220, 150, 320);
data.margins = new Margins(5, 5, 5, 5);
data.collapsible = true;
westPanel = new ContentPanel();
westPanel.setHeading("Navigation");
westPanel.setLayout(new FitLayout());
westPanel.setData(data);
westPanel.add(new Label("test"));

ToolBar toolBar = new ToolBar();
westPanel.setTopComponent(toolBar);

viewport.add(westPanel);
viewport.add(center, centerData);


the problem is with firefox 2.0.0.14 and IE7 ; with beta 1 no problems