mccleaf 2010-07-08 15:27
浏览 244
已采纳

Ext高手 帮忙解决 Ext缺少对象

下面是我的代码 top对象是我从Ext2.2api中拿来的 当不把Ext2.2中的js包和css包加进来时, 在top定义时报缺少对象 但是当我把Ext2.2中的js包和css包加进来时 它又报Ext.EventObject不存在,郁闷 求答案 小弟在此谢过了

var top = new Ext.FormPanel({
labelAlign: 'top',
frame:true,
title: 'Multi Column, Nested Layouts and Anchoring',
bodyStyle:'padding:5px 5px 0',
width: 600,
items: [{
layout:'column',
items:[{
columnWidth:.5,
layout: 'form',
items: [{
xtype:'textfield',
fieldLabel: 'First Name',
name: 'first',
anchor:'95%'
}, {
xtype:'textfield',
fieldLabel: 'Company',
name: 'company',
anchor:'95%'
}]
},{
columnWidth:.5,
layout: 'form',
items: [{
xtype:'textfield',
fieldLabel: 'Last Name',
name: 'last',
anchor:'95%'
},{
xtype:'textfield',
fieldLabel: 'Email',
name: 'email',
vtype:'email',
anchor:'95%'
}]
}]
},{
xtype:'htmleditor',
id:'bio',
fieldLabel:'Biography',
height:200,
anchor:'98%'
}],

    buttons: [{
        text: 'Save'
    },{
        text: 'Cancel'
    }]
});

var sendnotedlg;
var win;
function sendshow(btn){
if(!win){
win = new Ext.Window({
title : '维护通知',
closable : true,
layout : 'hbox',
width : 600,
height : 450,
items : top
});
}
win.show();
}

  • 写回答

2条回答 默认 最新

  • works001 2010-07-09 08:23
    关注




    03.grid



    <br> Ext.onReady(function(){<br> var top = new Ext.FormPanel({ <br> labelAlign: &#39;top&#39;, <br> frame:true, <br> title: &#39;Multi Column, Nested Layouts and Anchoring&#39;, <br> bodyStyle:&#39;padding:5px 5px 0&#39;, <br> width: 600, <br> items: [{ <br> layout:&#39;column&#39;, <br> items:[{ <br> columnWidth:.5, <br> layout: &#39;form&#39;, <br> items: [{ <br> xtype:&#39;textfield&#39;, <br> fieldLabel: &#39;First Name&#39;, <br> name: &#39;first&#39;, <br> anchor:&#39;95%&#39; <br> }, { <br> xtype:&#39;textfield&#39;, <br> fieldLabel: &#39;Company&#39;, <br> name: &#39;company&#39;, <br> anchor:&#39;95%&#39; <br> }] <br> },{ <br> columnWidth:.5, <br> layout: &#39;form&#39;, <br> items: [{ <br> xtype:&#39;textfield&#39;, <br> fieldLabel: &#39;Last Name&#39;, <br> name: &#39;last&#39;, <br> anchor:&#39;95%&#39; <br> },{ <br> xtype:&#39;textfield&#39;, <br> fieldLabel: &#39;Email&#39;, <br> name: &#39;email&#39;, <br> vtype:&#39;email&#39;, <br> anchor:&#39;95%&#39; <br> }] <br> }] <br> },{ <br> xtype:&#39;htmleditor&#39;, <br> id:&#39;bio&#39;, <br> fieldLabel:&#39;Biography&#39;, <br> height:200, <br> anchor:&#39;98%&#39; <br> }], </p> <pre><code> buttons: [{ text: &#39;Save&#39; },{ text: &#39;Cancel&#39; }] }); </code></pre> <p>var sendnotedlg; <br> var win; <br> function sendshow(btn){ <br> if(!win){ <br> win = new Ext.Window({ <br> title : &#39;维护通知&#39;, <br> closable : true, <br> layout : &#39;hbox&#39;, <br> width : 600, <br> height : 450, <br> items : top <br> }); <br> } <br> win.show(); <br> }<br> sendshow();</p> <p>});<br>





    测试没有问题啊 我用的ext2.2库文件 测试的
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 cplex运行后参数报错是为什么
  • ¥15 之前不小心删了pycharm的文件,后面重新安装之后软件打不开了
  • ¥15 vue3获取动态宽度,刷新后动态宽度值为0
  • ¥15 升腾威讯云桌面V2.0.0摄像头问题
  • ¥15 关于Python的会计设计
  • ¥15 聚类分析 设计k-均值算法分类器,对一组二维模式向量进行分类。
  • ¥15 stm32c8t6工程,使用hal库
  • ¥15 找能接spark如图片的,可议价
  • ¥15 关于#单片机#的问题,请各位专家解答!
  • ¥15 博通raid 的写入速度很高也很低