带有自定义按钮的ExtJs消息框 [英] ExtJs Message box with Custom buttons

查看:103
本文介绍了带有自定义按钮的ExtJs消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用自定义按钮显示ExtJS消息框。



我想要一个带有自定义消息的消息框和取消和停用按钮。
请给出一些想法。

 按钮:[{
文本:取消,
处理函数:function(){
Ext.MessageBox.hide();
// submitTicketForm();
}
},{
文本:停用,
处理程序:function(){
Ext.MessageBox.hide();
}
}],

我正在使用它,但没有得到任何按钮。

解决方案

MessageBox是用于提示,显示,提醒等的内部管理窗口的单个实例。 p>

您可以通过传递一个字符串来更改buttonText,如下所示:

 按钮:{ok:Foo,取消:Bar} 

参考:
MessageBox

 按钮:{
ok:Foo,
处理程序:function(){
Ext。 MessageBox.hide();

},
取消:Bar,
处理程序:function(){
Ext.MessageBox.hide();
}
}


How to display ExtJS Message box with Custom buttons.

I want a Message box with a Custom message and "Cancel" and "Deactivate" Buttons. Please give some idea.

buttons: [{
    text: "Cancel",
    handler: function () {
        Ext.MessageBox.hide();
        //submitTicketForm();
    }
},{
    text: "Deactivate",
    handler: function () {
        Ext.MessageBox.hide();
    }
}],

I am using it like this but not getting any buttons.

解决方案

MessageBox is an single instance of an internally managed Window used for prompt, show, alert, etc.

You can change the buttonText by passing in a string for show like this:

buttons: {ok: "Foo", cancel: "Bar"}

Refer : MessageBox

buttons: { 
                ok: "Foo", 
                handler: function(){ 
                    Ext.MessageBox.hide(); 

                },
                cancel: "Bar",
                handler: function(){
                    Ext.MessageBox.hide();
                }
        }

这篇关于带有自定义按钮的ExtJs消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆