ExtJS讓被遮蓋的表單顯示在最前面以及解決Ext.MessageBox提示框被TabPanel覆蓋的方法【轉】

來源:互聯網
上載者:User

標籤:

ExtJS讓被遮蓋的表單顯示在最前面以及解決Ext.MessageBox提示框被TabPanel覆蓋的方法本文由arthinking發表於5年前 | Javascript | 暫無評論 |  被圍觀 14,752 views+
一、如何讓ExtJS的彈出提示資訊框Ext.MessageBox或者建立的Ext.Window顯示在最前面:

下面是顯示一個Window的JS代碼:

var formPanel = MisTab1.createAddFormPanel();var addWin = new Ext.Window({      title: "添加產品類別",     pageX: 50,    pageY: 50,    width: 600,      height: 200,      plain: true,     resizable: false,          collapsible: true,       closeAction: ‘close‘,      closable: true,    modal: ‘true‘,      buttonAlign: "center",    bodyStyle: "padding:20px 0 0 0",    alwaysOnTop: true,    items: [formPanel],      buttons: [{             text: "添 加",             minWidth: 70,             handler: function() {                           }         }, {             text: "關 閉",             minWidth: 70,             handler: function() {            }         }]    });addWin.show();

效果

想要讓Window顯示在最前面,只要建立一個WindowGroup管理建立的Window即可,需要添加的代碼如下:

var tab1GroupMgr = new Ext.WindowGroup();  //前置視窗tab1GroupMgr.zseed=99999;  var addWin = new Ext.Window({      title: "添加產品類別",     pageX: 50,    pageY: 50,    width: 600,      height: 200,      plain: true,    manager: tab1GroupMgr,...

二、ExtJS彈出提示資訊框Ext.MessageBox或者建立的Ext.Window被Ext.TabPanel覆蓋的解決方案

出現這種原因可能是因為TabPanel設定了floating:true配置項。

floating : Boolean
True表示為浮動此面板(帶有自動填滿和投影的絕對位置),false...
True表示為浮動此面板(帶有自動填滿和投影的絕對位置),false表示為在其渲染的位置"就近"顯示(預設為false)。True to float this Panel (absolute position it with automatic shimming and shadow), false to display it inline where it is rendered (defaults to false).

解決方案就是把設定的floationg:true配置項去掉:

var tabPanel = new Ext.TabPanel({region: ‘center‘,activeTab:0,shadow: true,floating: true,    //去掉該配置項items: [{title: ‘歡迎頁面‘}]});
除了文章中有特別說明,均為IT宅原創文章,轉載請以連結形式註明出處。
本文連結:http://www.itzhai.com/extjs-form-to-be-displayed-on-the-front-cover-and-solve-ext-messagebox-boxes-are-covered-by-the-method-tabpanel.html關鍵字: ExtJS, floating, TabPanel, 遮蓋arthinking指彈吉他 && 技術more

 

ExtJS讓被遮蓋的表單顯示在最前面以及解決Ext.MessageBox提示框被TabPanel覆蓋的方法【轉】

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.