How sets z-index to Ext.Panel (ExtJS)?

≯℡__Kan透↙ 提交于 2020-01-20 05:03:05

问题


I have problem with z-index (i think) in ExtJS. While drag and drop element from GridPanel to DataView I drop element over GridPanel and it dropped to DataView. But DataView have place under the GridPanel, and this imposible! Thx! (problem in all browsers)


回答1:


Have you tried setting the z-index of your item to a higher order? ie.

Ext.Msg.show({
    title:'Request Failed',
    msg:"Error, The request was not found in the database",
    icon: Ext.MessageBox.ERROR,
    buttons: Ext.Msg.OK
});
Ext.MessageBox.getDialog().getEl().setStyle('z-index','80000');



回答2:


Windows

If you have want to manage the zIndex for windows you can use the Ext.WindowManager. All windows are registered automatically to the window manager so you can do:

Ext.WindowManager.bringToFront(component)

or get the next zIndex

Ext.WindowManager.getNextZSeed()

All floating components

If the issue is with other floating components like the dragging stuff you can register the present components to a zIndexManager

var zIndexManager = new Ext.ZIndexManager;
zIndexManager.register(compA);
zIndexManager.register(compB);

Then you can do:

zIndexManager.sendToBack(comp);
zIndexManager.bringToFront(comp);

or manage it with:

zIndexManager.getNextZSeed();


来源:https://stackoverflow.com/questions/3424665/how-sets-z-index-to-ext-panel-extjs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!