MessageBoxUtils类的代码如下:

 Ext.define('org.pine.util.MessageBoxUtils', {
singleton: true, /** 普通信息提示框 */
Info : function(title,msg) {
if(arguments.length==0){
title='消息';
msg='';
}else if(arguments.length==1){
msg=arguments[0];//msg=title;
title='消息';
}
Ext.MessageBox.show({
title: title,
msg: msg,
buttons: Ext.MessageBox.OK,
icon: Ext.MessageBox.INFO
});
}, /** 警告信息提示框 */
Warning : function(title,msg) {
if(arguments.length==0){
title='警告';
msg='';
}else if(arguments.length==1){
msg=arguments[0];//msg=title;
title='警告';
}
Ext.MessageBox.show({
title: title,
msg: msg,
buttons: Ext.MessageBox.OK,
icon: Ext.MessageBox.WARNING
});
}, /** 成功信息提示框 */
Success : function(title,msg) {
if(arguments.length==0){
title='成功';
msg='';
}else if(arguments.length==1){
msg=arguments[0];//msg=title;
title='成功';
}
Ext.MessageBox.show({
title: title,
msg: msg,
buttons: Ext.MessageBox.OK,
icon: "x-message-box-success"
});
}, /** 失败信息提示框 */
Error : function(title,msg) {
if(arguments.length==0){
title='失败';
msg='';
}else if(arguments.length==1){
msg=arguments[0];//msg=title;
title='失败';
}
Ext.MessageBox.show({
title: title,
msg: msg,
buttons: Ext.MessageBox.OK,
icon: Ext.MessageBox.ERROR
});
}
});

完整测试代码如下:

MessageBox.zip

带有图标的MessageBox的更多相关文章

  1. c# WPF——创建带有图标的TreeView

    1.使用数据模板对TreeViewItem进行更改 2.xaml中重写TreeviewItem的控件模板 3.继承TreeViewItem(TreeView中的元素),后台进行控件重写.(介绍此方法) ...

  2. WPF 带CheckBox、图标的TreeView

    WPF 带CheckBox.图标的TreeView 在WPF实际项目开发的时候,经常会用到带CheckBox的TreeView,虽然微软在WPF的TreeView中没有提供该功能,但是微软在WPF中提 ...

  3. 能添加图标的label

    能添加图标的label 效果 源码 https://github.com/YouXianMing/UI-Component-Collection 中的 IconEdgeInsetsLabel // / ...

  4. Android实现带图标的ListView

    版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/bear_huangzhen/article/details/23991119 Android实现带图 ...

  5. Qt 怎样生成带图标的exe

    一.问题描述 当我们在 Windows 下用 VS 生成 exe 程序时,如果窗口程序指定了图标,那么生成的 exe 程序便是指定的图标模样. 但是,当使用 Qt Creator 编译程序却不同.即使 ...

  6. QT学习之如何在QToolBar中添加带图标的QToolButton并设置图标大小

    在网上查到了三种方法,找到一种比较好理解的. 使用QIcon类: QToolButton *toolBtn1 = new QToolButton(this); //创建QToolButton tool ...

  7. 【转】Ext JS 集合1713个icon图标的CSS文件

    原文:http://extjs.org.cn/node/715 由于最近在研究Extjs4.1.1,没想到Extjs没有自带的iconCls所使用的图标样式css,就是用那个写那个的,纠结了半天,网上 ...

  8. IconFont 图标的3种引用方式

    第一步:进入阿里巴巴矢量图网站:http://www.iconfont.cn/   阿里巴巴矢量图 第二步:搜索你分类的关键字---然后加入购物车,下载到本地,然后解压,会将合并后的字体文件及自动生成 ...

  9. nw.js自定义最小化图标的click事件

    选择frameless时,最小化和关闭按钮的点击事件需要自己来做,办法是: /* * 下面两个模块一定要引入到js文件中 */ var gui = require('nw.gui'); var win ...

随机推荐

  1. windows环境下mongodb下权限设置

    1.创建超级用户 超级用户位于admin集合下. use admin db.createUser({ user:'admin', pwd:'123456', roles:[{role:'root',d ...

  2. Behavior Trees for Path Planning (Autonomous Driving)

    Behavior Trees for Path Planning (Autonomous Driving) 2019-11-13 08:16:52 Path planning in self-driv ...

  3. web3 编译部署调用合约

    //导入solc 编译器 let solc = require('solc') let fs = require('fs') //读取合约 let sourceCode = fs.readFileSy ...

  4. 用PMML实现python机器学习模型的跨平台上线

    python信用评分卡(附代码,博主录制) https://study.163.com/course/introduction.htm?courseId=1005214003&utm_camp ...

  5. Swift5升级遇到的AVCapturexxxDelegate的坑,写法换了

    升级到swift5之后,遇到关于AVCapture的两个代理都失效了, 找了一圈,发现原因是代理方法写法变了,如果不替换,代理事件就收不到了 解决方法: 替换新写法就可以了 我这边只举例我遇到的两个例 ...

  6. SNF快速开发平台2020版

    SNF快速开发平台分如下子平台: 1.CS快速开发平台 2.BS快速开发平台 3.H5移动端快速开发平台 4.软件开发机器人平台 配置型开发零编程 SNF快速开发平台是一个比较成熟的.net领域的商业 ...

  7. linux环境下安装python 3

    说明: 在linux环境下,都默认安装python 2的环境,由于python3在python2的基础上升级较大,所以安装python 3环境用于使用最新的python 3的语法. 安装过程: 1.下 ...

  8. 第一节:Python+Selenium环境搭建

    一.selenium工作原理 二.安装python Window系统下,python的安装很简单.访问python.org/download,下载最新版本,安装过程与其他windows软件类似.记得下 ...

  9. win10更改pip源

    摘自:https://blog.csdn.net/qq_31443999/article/details/88750833 win10安装TensorFlow卡崩更改为国内清华大学镜像源,即可. 具体 ...

  10. java拼接字符串、格式化字符串方式

    1.代码 //+ String arg0 = "Bob"; String arg1 = "Alice"; System.out.println("he ...