2
Ext.onReady(function(){ 
    Ext.create('Ext.panel.Panel',{
    title:'MAin Panel',
    renderTo:Ext.getBody(),
    height:600,
    width:600,
     bodyStyle: {
            background: 'yellow',
            position:'absolute ',
            'z-index': -1
        },
        items:[
               {
                 xtype:  Ext.create('Ext.window.Window',{
                        height : 500,
                        width : 500,
                        id:'abc',
                        items : [
                                    {
                                        xtype : 'button',
                                        text : 'Open',
                                        handler : function(){
                                            /* w2.showAt(450,300);
                                            w1.disable(); */
                                        }
                                    },
                                    {
                                        xtype:'panel',
                                        title:'Inner Panel',
                                        height:200,
                                        width:200,
                                        style:{
                                             position:'absolute ',
                                            'z-index': 2
                                        }
                                    }
                                 ],
                         bodyStyle:{
                              background: '#000000',
                              opacity: 0.7,

                         },
                 style:{
                     position:'absolute',
                     'z-index': 1

                 }
                    })

               }


               ]



});
Ext.getCmp('abc').show();
w1.setTitle('Window 1');
w1.show();
});

I have the above code, and I want that "Inner Panel" should come over window "abc", and the opacity attribute should not apply on "Inner Panel". Child components of window "abc" is also getting the opcaity. I have tried the style:{ position:'absolute', 'z-index': 1}, same code is working html,but not in extjs.

Kjuly
  • 34,476
  • 22
  • 104
  • 118
user980343
  • 21
  • 1
  • 4
  • possible duplicate of [How sets z-index to Ext.Panel (ExtJS)?](http://stackoverflow.com/questions/3424665/how-sets-z-index-to-ext-panel-extjs) – CD.. Oct 17 '12 at 13:50

1 Answers1

0

I suggest you to use ZIndexManager.

First, register all of your containers and then use bringToFront method to show the container you want.

Wilk
  • 7,873
  • 9
  • 46
  • 70