PDA

View Full Version : Window size and resize issues



wisecounselor
23 Nov 2007, 8:08 AM
Hi,

I modified the sample complex layout to try to create an MDI type interface, basically I removed the rightmost column, and made the center area an empty container instead of a tab panel. Now I am opening new Windows in the center area, which seems to work great, with the following 2 minor issues:

1. when I specify and height and width in the new Window config options, they are ignored and window is seemingly randomly sized. I can call setSize after I create the window to set the intial size, though.

2. I have constrained = true to force the window to stay inside its container, which works great, but I can resize the window outside the container, which screws it up. I thought constrain would prevent this.

So, I am writing something to get the container size and prevent resizing outside its limits, but I think constrain should handle this.

Anyone have any ideas why the initial size doesn't work?

Brian

efege
23 Nov 2007, 8:14 AM
1. Can you post your sample code? (Just the relevant portion where you create the Window)

2. Just a link to a thread I started for a similar problem, with no replies so far: http://extjs.com/forum/showthread.php?t=17024

wisecounselor
23 Nov 2007, 11:51 AM
Note, I tried this without layout: fit, that is the only other option I tried.

It does not take the intial 400 x 400 size, and I can resize it outside its container.

To see my working start, go to

http://216.119.235.161:8080/itracker/

click New - Implant
There may be something wrong with my overall layout I have created



var windows = new Ext.WindowGroup();
var implantform = function(config) {
var win = windows.get('brian');
if( ! win )
{
var win = new Ext.Window({
id: 'brian',
manager: windows,
minimizable: true,
maximizable: true,
width: 400,
height: 400,
html : '<p>Something useful would be in here.</p>',
shim:false,
animCollapse:false,
constrainHeader:true,
constrain: true,
renderTo: 'mdi',
layout: 'fit',
autoScroll: true
});
}

win.setSize({height: 400,width:400});

win.show();