+ -
当前位置:首页 → 问答吧 → 又是一个新手问题

又是一个新手问题

时间:2011-12-01

来源:互联网

错误: Ext.Container.LAYOUTS[this.layout.toLowerCase()] is not a constructor
源文件:http://localhost:8080/Ext/ext/ext-all.js
行:7
用的2.2
新手啊新手啊  
Ext.onReady(function(){
Ext.QuickTips.init();
var panel = new Ext.form.FormPanel({
title:"layout",
width:650,
autoHeight:true,
frame:true,
layout:"form",
labelWidth:65,
labelAlign:"right",
items:[{
layout:"column",
items:[{
layout:"form",
columnWidth:.3,
items:[{
xtype:"textfield",
fieldLabel:"姓",
width:120
},{
layout:"form",
columnWidth:.3,
items:[{
xtype:"textfield",
fieldLabel:"名",
width:120
}]

},{
layout:"form",
columnWidth:.3,
items:[{
xtype:"textfield",
fieldLabel:"英文名",
width:120

}]
}]
},{
layout:"column",
items:[{
layout:"form",
columnWidth:.5,
items:[{
xtype:"textfield",
fieldLabel:"座右铭1",
width:120
},{
xtype:"textfield",
fieldLabel:"座右铭2",
width:120
}]


}]

},{
layout:"from",
items:[{
xtype:"textfield",
fieldLabel:"啦啦",
width:150
},{
xtype:"textfield",
fieldLabel:"呵呵",
width:150
}]
},{
layout:"column",
items:[{
layout:"form",
columnWidth:.2,
items:[{
xtype:"textfield",
width:100,
fieldLabel:"最爱的电影"

},{
xtype:"textfield",
width:100,
fieldLabel:"最爱的食物"
},{
xtype:"textfield",
width:100,
fieldLabel:"最爱的事情"
},{
xtype:"textfield",
width:100,
fieldLabel:"最喜欢的饮料"
}]
}]
},{
layout:"form",
items:[{
xtype:"htmleditor",
fieldLabel:"随便说说不",
enableLists: false,
enableSourceEdit: false,
height: 150
}]


}]
}],
buttons:[{
text:"提交"
},{
text:"重置"
}],
buttonsAlign:"center"

});
panel.render(Ext.getBody());
})

作者: tingyuing   发布时间: 2011-12-01

layout:"from", 改成 form

作者: hookee   发布时间: 2011-12-01

引用 1 楼 hookee 的回复:

layout:"from", 改成 form


额。。 确实 出来了 
好人啊 给我说说Ext.FormPanel 和Ext.form.FormPanel 关系 区别不

作者: tingyuing   发布时间: 2011-12-01

只有Ext.form.FormPanel 吧 FormPanel使用FormLayout的布局

作者: hookee   发布时间: 2011-12-01

相关阅读 更多