Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

extjs

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)

like image 206
Vitalii Sky Avatar asked Aug 06 '10 14:08

Vitalii Sky


2 Answers

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');
like image 59
Chesneycar Avatar answered Oct 19 '22 19:10

Chesneycar


Windows

If you 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();
like image 21
VDP Avatar answered Oct 19 '22 19:10

VDP