阿阿阿飞翔阿 2009-09-03 16:34
浏览 219
已采纳

ext bbar 上添加一个 combox 后 当点击 combox 怎么报错?

ext bbar 上添加一个 combox 后 当点击 combox 怎么报错?

var combox = new Ext.form.ComboBox({
id:'combo',
tpl: '

{state}
',
store: store,
displayField:'state',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'select a state...',
selectOnFocus:true
})

var tabpanel2 = new Ext.TabPanel(
{
region:'center',
deferredRender:false,
activeTab:0,
bbar:[
{
id:'rotation',
text: '旋转'
},{
id:'delete',
text: '删除'
},

combox , //批注下拉选项
{
id:'addMark',
text: '添加批注'
}
]
});

  • 写回答

2条回答 默认 最新

  • iteye_18964 2009-09-03 16:47
    关注

    你看一下这个例子吧
    [code="java"]

    Ext.onReady(function(){ var testDS=new Ext.data.Store({ proxy:new Ext.data.MemoryProxy([[0,'测试1'],[1,'测试2'],[2,'测试3']]), reader:new Ext.data.ArrayReader({},[{name:'id'},{name:'finishValue'}]) }); testDS.load(); var testCmb=new Ext.form.ComboBox({ fieldLabel:'完成标志', hiddenName:'finishFlag', displayField:'finishValue', triggerAction:'all', selectOnFocus:true, store:testDS, valueField:'id', editable:false, mode:'local', width:210, value:0 }); var tabpanel2 = new Ext.TabPanel( { region:'center', deferredRender:false, activeTab:0, bbar:[ { id:'rotation', text: '旋转' },{ id:'delete', text: '删除' }, testCmb , //批注下拉选项 { id:'addMark', text: '添加批注' } ]}); var panel = new Ext.Panel({ width:500, height:300, items:[tabpanel2] }); panel.render("panel"); });
    </head>
    <body>
        <table cellspacing="5" cellpadding="5">
            <tr>
                <td>
                    <div id="panel"></div>
                </td>
            </tr>
        </table>
    </body>
    

    [/code]

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料