将Window的属性closeAction设置为hide就可以了。

var panel1 = Ext.create('Ext.panel.Panel', {
title: 'this is panel 1',
width: 100,
height: 60
}); var panel2 = Ext.create('Ext.panel.Panel', {
title: 'this is panel 2',
width: 200,
height: 60
}); var win = Ext.create('Ext.window.Window', {
title: 'Window',
width: 300,
height: 200,
layout: 'auto',
closeAction : 'hide',
items: [panel1,panel2]
}); Ext.onReady(function(){ Ext.create('Ext.panel.Panel', {
title: 'This is a panel',
width: '100%',
height: '100',
renderTo: Ext.getBody(),
dockedItems: [
{
xtype: 'toolbar',
dock: 'top',
items:[
{
text: 'show me',
handler: function(){
win.show();
}
},
{
text: 'close me',
handler: function(){
win.hide();
}
}
]
}
]
});
});

Window 点击“X”关闭之后无法show的更多相关文章

  1. 使用js冒泡实现点击空白处关闭弹窗

    什么是事件冒泡? 如图:在一个对象上触发某类事件(比如单击onclick事件),这个事件会向这个对象的父级对象传播,从里到外,直至它被处理(父级对象所有同类事件都将被激活),或者它到达了对象层次的最顶 ...

  2. android 点击屏幕关闭 软键盘

    //点击屏幕 关闭输入弹出框 @Override public boolean onTouchEvent(MotionEvent event) { InputMethodManager im = (I ...

  3. lhgdialog在打开的窗口里点击按钮关闭当前窗口

    lhgdialog在打开的窗口里点击按钮关闭当前窗口 var api = frameElement.api, W = api.opener; api.close();

  4. Android点击View显示PopupWindow,再次重复点击View关闭PopupWindow

     Android点击View显示PopupWindow,再次重复点击View关闭PopupWindow 这本身是一个看似很简单的问题,但是如果设置不当,就可能导致莫名其妙失效问题.通常在Andro ...

  5. jqeury点击空白关闭弹窗

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  6. UITableView延伸:点击cell关闭键盘,加载不同cell,监听里面的textfeild内容改变

    其实点击cell关闭键盘只要一句话 - () {         cell = [tableView dequeueReusableCellWithIdentifier:){         cell ...

  7. Flex里监听mouseDownOutside事件解决弹出窗口点击空白关闭功能

    其实当用户在使用 PopUpManager 打开的某个组件外部单击时,会从该组件分派一个mouseDownOutside事件 监听该事件就能实现点击空白处关闭窗口的功能 this.addEventLi ...

  8. div悬浮在屏幕的中间及点击按钮关闭弹出框

    #fd { position: fixed; z-index: 999; width: 109px; height: 323px; top: 71%; right: 1%; margin: -50px ...

  9. ext Window点击右上角的关闭(Xbutton)加入监控事件

    使用场景:关闭window的时候添加监听事件. 正确的使用方式: addwin = new Ext.Window({ title : '新增', closable : true, width : 50 ...

随机推荐

  1. Codeforces 474D Flowers

    http://codeforces.com/problemset/problem/474/D 思路:F[i]=F[i-1]+(i>=K)F[i-k] #include<cstdio> ...

  2. Absolute sort

    Absolute sort Let's try some sorting. Here is an array with the specific rules. The array (a tuple) ...

  3. Check iO:初学Python

    The end of other For language training our Robots want to learn about suffixes. In this task, you ar ...

  4. 福建省队集训被虐记——DAY3

    昨天没写--今天补上吧 一如既往的跪了 棋盘 [问题描述] 给出一个N*M的方格棋盘,每个格子里有一盏灯和一个开关,开始的时候,所有的灯都是关着的.用(x, y)表示第x行,y列的格子.(x, y)的 ...

  5. C++函数后面加const修饰

    声明一个成员函数的时候用const关键字是用来说明这个函数是 "只读(read-only)"函数,也就是说明这个函数不会修改任何数据成员(object). 为了声明一个const成 ...

  6. Game of Life 解答

    Question According to the Wikipedia's article: "The Game of Life, also known simply as Life, is ...

  7. Longest Consecutive Sequence 解答

    Question Given an unsorted array of integers, find the length of the longest consecutive elements se ...

  8. hdu 4504 威威猫系列故事——篮球梦_简单dp

    题目链接 题意:你现在分数为a,对方分数为b,你比赛还有n分钟,每次进攻需要15分钟,现在你先进攻,每次进攻可以得1或2或3,对方每次进攻得一分,问超过对方分数有多少种打法 思路:因为情况太多要用__ ...

  9. linux cache swap 以及 虚拟内存等

    提出四个问题及解答: 1)若进程在运行过程中,物理内存不足会发生什么? 2)为何进程在占用物理内存不变的情况下,系统的物理内存会增加? 3)为何程序的大小大于实际占用的物理内存?(假如程序30M,却只 ...

  10. 关于vi不正常退出产生的swp文件

    关于vi不正常退出产生的swp文件   非正常关闭vi编辑器时会生成一个.swp文件 关于swp文件 使用vi,经常可以看到swp这个文件,那这个文件是怎么产生的呢,当你打开一个文件,vi就会生成这么 ...