在sencha中的模态面板不会显示在点击上

时间:2013-10-06 16:46:21

标签: extjs touch modal-dialog panel

我想通过单击工具栏中的按钮来显示模态信息窗口。我不知道为什么,但是当我点击按钮时没有任何反应。

继承我的代码:

xtype: 'toolbar',
            docked: 'bottom',
            items: [
                {
                xtype: 'button',
                text: 'Infos anzeigen',
                handler: function(){
                    var panel = new Ext.Panel({
                        modal: true,
                        left: 0,
                        top: 0,
                        width: 220,
                        height: 356,
                        layout: 'fit',
                        html: 'Testing'
                    });
                    panel.show();
                    }
                }]

1 个答案:

答案 0 :(得分:1)

您可能正在寻找Ext.Window

var win = new Ext.Window({
    modal: true,
    left: 0,
    top: 0,
    width: 220,
    height: 356,
    layout: 'fit',
    html: 'Testing'
});
win.show();