我創建了這個非常簡單的窗口擴展名。在Firefox中看起來應該是這樣,但在IE7中,包含的項目流出窗口。ExtJS&IE7:用簡單的窗口渲染問題
我能做些什麼來解決這個問題?
代碼:(文檔類型是嚴格的,但不會顯示出於某種原因)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Online example</title>
<link rel="stylesheet" type="text/css" href="http://dev.sencha.com/deploy/dev/resources/css/ext-all.css" />
<script type="text/javascript" src="http://dev.sencha.com/deploy/dev/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="http://dev.sencha.com/deploy/dev/ext-all.js"></script>
</head>
<body>
<script type="text/javascript">
Ext.onReady(function(){
MyWindow = Ext.extend(Ext.Window, {
layout: 'fit',
width: 370,
height: 500,
resizable: true,
closable: true,
closeAction: 'hide',
collapsible: true,
autoScroll: true,
bodyStyle: 'padding:5px;',
title: 'Window',
initComponent: function() {
var config = {
items:
[
{
xtype: 'fieldset',
title: 'Buffer valg',
layout: 'form',
items:
[
{
xtype: 'numberfield',
fieldLabel: 'Label'
}, {
xtype: 'checkbox',
fieldLabel: 'Label',
checked: true
}
]
}
]
}
Ext.apply(this, Ext.apply(this.initialConfig, config));
// Config object has already been applied to 'this' so properties can
// be overriden here or new properties (e.g. items, tools, buttons)
// can be added, eg:
// Call parent (required)
MyWindow.superclass.initComponent.apply(this, arguments);
}
});
AWindow = new MyWindow();
AWindow.show();
});
</script>
</body>
</html>
它似乎沒有工作 - 仍然是相同的視覺問題。但是要解決這個問題:我應該如何創建窗口和內容,以便我可以擁有一個`container`,其中包含多個fieldset`項目,它們都包含多個項目,它們*保證*窗口太小而不能顯示所有項目(這就是爲什麼我不希望窗口能夠滾動)? – Chau 2011-02-11 08:56:17
爲什麼你要保證它會太小?從可用性的角度來看,滾動條是令人討厭的。如果你想嘗試並解決視覺問題,儘管你可以嘗試添加`bodyStyle:'overflow:hidden'` – JamesHalsall 2011-02-12 11:38:33