maxSize does not change dynamically
I have a webpage with a splitted layout in the middle (south-center) of a div. The layout is defined as such:
var innerLayout = new Ext.BorderLayout("divContent",
{
west: {
split: true,
minSize: 240,
titlebar: false,
collapsible: false
},
center: {
minSize: 240,
autoScroll: true,
titlebar: false,
collapsible: false
}
}
);
At some point in my code, I would like to modify the maxSize of the west region, so I use something like this this:
var splitbar = innerLayout.getRegion('west').getSplitBar();
splitbar.maxSize = 520;
or
splitbar.setMaximumSize(520);
but neither of these work, that is, the splitbar still honors the original maxSize setting (if not defined, 2000).
Is this a bug or am I doing something wrong here?
var splitbar = innerLayout.getRegion('west').getSplitBar();
splitbar.getMaximumSize = function(){ return 520; }
Because of the strict ability to control the center region size, I can't imagine a use case where this would be needed. Care to share?
innerLayout.getRegion('center').getEl().setWidth(5 00);
innerLayout.getRegion('center').minWidth = 500;
innerLayout.layout();
it doesn't work (meaning that it does not automatically move the splitbar to honor the right dimensions).
This, however, works:
var widthTotal = innerLayout.getEl().getWidth();
innerLayout.getRegion('west').getEl().setWidth(wid thTotal - 500);
innerLayout.getRegion('center').minWidth = 500;
innerLayout.layout();
Other than that, I did not realize that the setMinimumSize and setMaximumSize functions applied only to the center region, so, to answer your question, I do not need right now to set it on the west region, the aforementioned solution works for me. But maybe you should put it in the documentation, if it's not already there and I missed it.
Thanks Jack, keep up the good work!
#If you have any other info about this subject , Please add it free.# |
Posted by jane under xn--g2x675c.com edit