阿阿阿飞翔阿 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条)

报告相同问题?

悬赏问题

  • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
  • ¥50 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥15 state显示变量是字符串形式,但是仍然红色,无法引用,并显示类型不匹配
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波
  • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗