I have a simple chunk of code. it adds an Image (using Ext.Img) to a comtainer once image is loaded. for some reason, 'backgound' mode does not show.
can someone explain?
thanks in advance.
Code:
        var cont = Ext.create('Ext.Container',{layout: 'hbox'});
        
        var theImg = Ext.create('Ext.Img', {
                    src: 'http://i48.tinypic.com/33n7q7r.jpg',
                    mode: 'background',//does not display image even though css backgournd image is applied
                    //mode: 'none'//displays img as IMG tag
                    listeners: {
                        scope: cont,
                        load: function( img, event, eOpts ) {
                            this.add(img);
                        }            
                    }
        });
        Ext.Viewport.add(cont);