Yes I have tried this layout but it doesn't work like I want.
Here is my code :
Code:
var previewPanel = new Ext.Panel({
title: 'Aperçu',
id: 'preview-panel',
renderTo: 'apercu',
width: '100%',
layout: {
type: 'fit'
},
//height: 500,
autoHeight: true,
collapsible: false,
items: [{
xtype: 'box',
id: 'div-cadre-apercu',
autoEl: {
id: 'apercu',
tag:"img",
src: "apercu" + action + "?timestamp=" + (new Date().getTime()),
border: "0",
height: "100%"
}
}]
});
It loads an image in a panel. The problem is I dont know the size of the image. With ExtJS 3.3 the autoHeight config option is perfect. The panel adjust automaticaly its size to the image. With ExtJS 4, this option is gone and I don't know how to do the same thing. I have the same problem with A GridPanel wich I want to be automatically resized when I resize the browser window.