ExtJS4 は初めてです。ExtJs4 Docs でいくつかの簡単なデモをテストしています。パネルのヘッダーは常にパネルの本体よりも少し小さく、パネルの内側も小さいことがわかりました。ヘッダーは、Firebug を使用したメジャーの下のボディよりも常に 11px 短くなります。私はFF、IE8、Chromeでコードをテストしましたが、それらはすべてスクリーンショットが示すようにレンダリングされます(画像リンク)。下手な英語でごめんなさい。この問題で混乱しています。助けてください。
スクリーンショットのリンク:
http://i.stack.imgur.com/vb2Xo.jpg
or
http://www.tu265.com/di-c870adf0409aa61a99c774186dd9afa8.jpg
私のjsコード:
Ext.create('Ext.panel.Panel', {
title: 'container panel',
renderTo: 'container',
width: 400,
height: 300,
layout: 'accordion',
items: [{
tools: [{ type: 'gear', handler: function () {
Ext.Msg.alert('msgWindow', 'btn is Clicked');
}
}, { type: 'refresh'}],
title: 'panel1',
xtype: "panel",
html: "insidePanel1"
}, {
title: 'panel2',
xtype: "panel",
html: "insidePanel2"
}, {
id: 'panel3',
title: 'panel3',
xtype: "panel",
html: "insidePanel3"
}]
});
Ext.create("Ext.Button", {
renderTo: 'container',
text: "open panel3",
handler: function () {
Ext.getCmp('panel3').expand(true);
}
});
html コード:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Layouts</title>
<link href="../../ext-4.0.7-gpl/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
<script src="../../ext-4.0.7-gpl/ext-all-debug.js" type="text/javascript"></script>
</head>
<body>
<div id="container"></div>
<script type="text/javascript">
//js code
</script>
</body>
</html>