Originally reported here:

http://www.sencha.com/forum/showthread.php?152160

Test case:

PHP Code:
function doTest () {
    
Ext.DomHelper.append(document.body, {
            
tag'div',
            
style: {
                
border'1px solid red',
                
height'300px',
                
overflowY'auto',
                
width'300px'
            
},
            
cn: [{
                
id"inner",
                
style'border: 1px solid green'
            
}]
        });

    
Ext.create('Ext.panel.Panel', {
        
collapsibletrue,
        
height400,
        
renderTo'inner',
        
title'Panel',
        
width200,
        
listeners: {
            
resize: function(panel) {
                var 
el Ext.get('inner');
                
panel.setWidth(el.getWidth() - el.getFrameWidth('lr'));
            }
        }
    });
}

Ext.onReady(doTest);