new Ext.Window({
    width  : 200,
    height : 200,
    autoWidth : true,
    autoHeight : true,
    items:[{
//  title : 'image',
 html : '<image src="' + url + '"></image>'
    }]
}).show();
这段代码高度可以根据图片大小自动调整,宽度不可以。为什么,怎么解决?

解决方案 »

  1.   

    width  : 'auto',
    height : 'auto',
      

  2.   

    new Ext.Window({
    renderTo:Ext.getBody(),
    bodyStyle:'padding:10px;',  //加个内边框好看一点
        items:[{
         html:'<image src="002.png"></image>'
        }]
    }).show();
    EXT 4.2 测试通过。ff下
      

  3.   


    new Ext.Window({    width  : 200,    height : 200,    autoWidth    :    true,    autoHeight    :    true, layout:'fit',   items:[{//     title : 'image',     html : '<image width=100% height=100% src="' + url + '"></image>'    }]}).show();