PDA

View Full Version : Grid in Resizable : problem when window width is narrowed



vk_phoenixfr
22 Feb 2007, 4:13 AM
Hi all,

I'm facing a problem using a Grid, inside a Resizable.

Let me explain. If I dont put the Resizable wrapping the grid, the Grid is correctly resized when I resize my browser window (making its width smaller). But I cannot make the grid bigger in height, as I have no handle. If I use a Resizable object, then a handle appear, I can resize my grid height.

Here is what I get then :

http://esnault.frederic.free.fr/temp/ok.png

But if now I narrow the window, then everything is resized accordingly except the Grid (and the Resizable object I guess).

Here is the result :

http://esnault.frederic.free.fr/temp/nok.png

Here is my table and resizable code :



tableView = new Ext.grid.Grid('rule-grid', {
ds: dataModel,
cm: ruleResultModel,
autoWidth: true,
monitorWindowResize: true
});

// Wrap it into the Resizable
var resizer = new Ext.Resizable('rule-grid', {
wrap: true,
minHeight:100,
minWidth:200,
pinned:true,
handles: 's'
});
resizer.on('resize', tableView.autoSize, tableView);

tableView.render();


Btw, the two toolbars above and below are resized, and they are all in three div's, same hierarchy level. Only difference is the grid is in the resizable.

Any idea?

Bug or not? I tried the examples for Resizable, and the wrapped object all suffer the same problem.

EDIT : just an idea, could it be somehow related with the overflow property, the Resizable changing it from the original "hidden" value to something more visible?

jack.slocum
22 Feb 2007, 6:32 AM
How would this be a bug in resizable?

Resizable it used to resize an element by setting it's width and height css attributes. It does not monitor winow resizes and fit into the page. If you need to constrain on window resize, you are going to have to implement it.

vk_phoenixfr
22 Feb 2007, 7:42 AM
I didn't say i was expecting Resizable to do it for me, I said before I use the Resizable, the grid was resizing according to the window. After, it does not any more.

Or may be add a possibility to set a Listener for resize event?