PDA

View Full Version : BorderLayout - no scrollbars, fit to size problem



themire
22 May 2007, 2:57 AM
Hi,

I have a BorderLayout with two ContentPanels.

I want the content to be fitted to the size of the panel with no scrollbars, even if the content is bigger than the size of the panel.

If I set autoScroll to true the content if fitted but there are scrollbars which I don't want.
If I set autoScroll to false the content is not fitted to the panel and flows outside of it.

Any suggestions as to how this could be achieved?
Thanks

init : function(){
var borderLayout = new YAHOO.ext.BorderLayout(document.getElementById("resizable"), {
west: {
split:true,
initialSize:340,
titlebar: true,
collapsible: true,
minSize:100,
maxSize:450,
floatable:true},
center: {
autoScroll:false}
});

borderLayout.beginUpdate();
var westPanel = new YAHOO.ext.ContentPanel('nav', {title: 'Navigation', fitToFrame:true, closable:false});
var mapContentPanel = new YAHOO.ext.ContentPanel('inner2', {fitToFrame:true, fitContainer:true, resizeEl:'blahblah'});

borderLayout.add('west', westPanel);
borderLayout.add('center', mapContentPanel);
borderLayout.endUpdate();
}

22 May 2007, 4:29 AM
Have you tried setting your content master div to height 100% width 100% or auto , auto?