首页 新闻 赞助 找找看

extjs4中,Panel头部总是短一截

0
悬赏园豆:5 [已关闭问题] 关闭于 2012-04-15 15:42

最近在学ext js4,我在使用Panel时,panel标题的头部总是短一截,FF、Chrome、IE都有这个问题,相同的代码,别人运行OK,我运行就短一截,有人遇到过这种情况么?困扰我好多天了~~

 1 //column
 2 Ext.create('Ext.Panel', {
 3     title: '容器面板',
 4     renderTo: 'div6',
 5     width: 400,
 6     height: 300,
 7     layout: 'column',
 8     defaults: {                     //设置没一列的子元素的默认配置
 9         layout: 'anchor',
10         defaults: {
11             anchor: '100%'
12         }
13     },
14     items: [{
15         columnWidth: 4 / 10,        //设置列的宽度
16         items: [{
17             title: '面板1',
18             border: false,
19             html: '子元素1'
20         }, {
21             title: '面板2',
22             border: false,
23             html: '子元素2'
24         }]
25     }, {
26         width: 120,
27         items: [{
28             title: '面板3',
29             border: false,
30             html: '子元素3'
31         }]
32     }, {
33         columnWidth: .40,
34         items: [{
35             title: '面板4',
36             border: false,
37             html: '子元素4'
38         }]
39     }]
40  
41 });

 

 1 Ext.create('Ext.Panel', {
 2     title: '容器面板',
 3     renderTo: 'div1',
 4     width: 400,
 5     height: 300,
 6     layout: 'absolute',
 7     items: [{
 8         title: '面板1',
 9         xtype: "panel",
10         html: "子元素1",
11         width: 200,
12         height: 100,
13         x: 50,
14         y: 50
15  
16     }, {
17         title: '面板2',
18         xtype: "panel",
19         html: "子元素2",
20         width: 200,
21         height: 100,
22         x: 100,
23         y: 80
24  
25     }]
26 });

 

weiwei5444的主页 weiwei5444 | 初学一级 | 园豆:187
提问于:2012-04-15 02:01
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册