Ext 夹七夹八

Ext 杂七杂八

buttons: Ext.MessageBox.YESNOCANCE

buttons(按钮)的取值如下:
OK:只有“确定”按钮
CANCEL:只有“取消”按钮
OKCANCEL:有“确定”和“取消”按钮
YESNO:有“是”和“否”按钮
YESNOCANCEL:有“是”、“否”和“取消”按钮


icon: Ext.MessageBox.QUESTION

icons(图标)取值如下:
INFO:信息图标
WARNING:警告图标
QUESTION:询问图标
ERROR:错误图标



//-----------面板---------------
title 决定Panel 是否有标题栏,属性值用于指定标题栏的名字,collapsible 值为true 表
示Panel可收缩

显示为:
Ext 夹七夹八
tools: [{
id: "refresh",
handler: function(event, toolEl, p){
p.getUpdater().update({url: "inner.html", scripts: true});
}
},{
id: "up",
handler: function(event, toolEl, p){
p.collapse(true);
}
},{
id: "down",
handler: function(event, toolEl, p){

p.expand(true);
}
},{
id: "help",
handler: function(event, toolEl, p){
Ext.Msg.alert("关于", "本软件系椰子林软件工作室出品,盗版必究!");
}
},{
id: "close",
handler: function(event, toolEl, p){
p.hide();
}
}]

pressed: true这个属性表示按钮处于按下状态,这样效果比较好.

Ext.get("btnAlert").on("click",a,this,{delay:2000});
延迟2秒后触发事件.