PDA

View Full Version : [FIXED][1.2.3] ContentPanel In Borderlayout limited minimum size



The_Jackal
14 Apr 2009, 10:04 PM
Hi,

ContentPanels in the North, South east and west positions all have a restricted minimum size. I want them to be about 10 pixels, but it appears to be about 40-50 for the North panel and about 50-60 for the other three.

Even when dragging the split, I can not shrink the panels to less than 50 pixels or so.

See the attached image.

This is visible in the border layout example on the website: http://extjs.com/explorer/#borderlayout

Here is sample code for completeness:



public class BorderLayoutContentPanelMinSizeBug implements EntryPoint
{
public void onModuleLoad()
{
Viewport viewport = new Viewport();

final BorderLayout layout = new BorderLayout();
viewport.setLayout(layout);

ContentPanel north = new ContentPanel();
ContentPanel west = new ContentPanel();
ContentPanel center = new ContentPanel();
center.setHeading("BorderLayout Example");

ContentPanel east = new ContentPanel();
ContentPanel south = new ContentPanel();

BorderLayoutData northData = new BorderLayoutData(LayoutRegion.NORTH, 10);
northData.setCollapsible(true);
northData.setFloatable(true);
northData.setHideCollapseTool(true);
northData.setSplit(true);
northData.setMargins(new Margins(5, 5, 0, 5));

BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 150);
westData.setSplit(true);
westData.setCollapsible(true);
westData.setMargins(new Margins(5));

BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
centerData.setMargins(new Margins(5, 0, 5, 0));

BorderLayoutData eastData = new BorderLayoutData(LayoutRegion.EAST, 150);
eastData.setSplit(true);
eastData.setCollapsible(true);
eastData.setMargins(new Margins(5));

BorderLayoutData southData = new BorderLayoutData(LayoutRegion.SOUTH, 5);
southData.setSplit(true);
southData.setCollapsible(true);
southData.setFloatable(true);
southData.setMargins(new Margins(0, 5, 5, 5));

viewport.add(north, northData);
viewport.add(west, westData);
viewport.add(center, centerData);
viewport.add(east, eastData);
viewport.add(south, southData);

RootPanel.get().add(viewport);
}
}

sven
15 Apr 2009, 6:19 AM
This is a minimumsize set in BorderLayout.

sven
15 Apr 2009, 6:23 AM
I removed it and it will be part of the next release.