Ltty
22 Nov 2011, 12:49 AM
Hi,
I've got a problem with the autoresizing of portals in my GWT application. Basically, I want to implement the portal like here (http://dev.sencha.com/playpen/gxt/portal/). So if I change the window size, I want that my portlets also resize automatically to fit the window again. I guess in the provided example you are using a ViewPort. However, I have to add a menu additionally, so I use a LayoutContainer to put my portal in:
portal = new Portal(PORTLET_SIZE);
portal.setStyleAttribute("backgroundColor", "white");
portal.setColumnWidth(0, .5);
portal.setColumnWidth(1, .5);
ContentPanel menuLayout = new ContentPanel();
menuLayout.setHeight(500);
BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 150);
westData.setCollapsible(true);
westData.setMargins(new Margins(5));
westData.setHideCollapseTool(false);
BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
centerData.setMargins(new Margins(5, 200, 5, 200));
mainLayout.add(menuLayout, westData);
mainLayout.add(portal, centerData);
So how can I implement the auto-resize behaviour for my portal? Is there also a way of setting the height of the layout container to the client window height? I haven't found a solution therefore yet.
I've got a problem with the autoresizing of portals in my GWT application. Basically, I want to implement the portal like here (http://dev.sencha.com/playpen/gxt/portal/). So if I change the window size, I want that my portlets also resize automatically to fit the window again. I guess in the provided example you are using a ViewPort. However, I have to add a menu additionally, so I use a LayoutContainer to put my portal in:
portal = new Portal(PORTLET_SIZE);
portal.setStyleAttribute("backgroundColor", "white");
portal.setColumnWidth(0, .5);
portal.setColumnWidth(1, .5);
ContentPanel menuLayout = new ContentPanel();
menuLayout.setHeight(500);
BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 150);
westData.setCollapsible(true);
westData.setMargins(new Margins(5));
westData.setHideCollapseTool(false);
BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
centerData.setMargins(new Margins(5, 200, 5, 200));
mainLayout.add(menuLayout, westData);
mainLayout.add(portal, centerData);
So how can I implement the auto-resize behaviour for my portal? Is there also a way of setting the height of the layout container to the client window height? I haven't found a solution therefore yet.