PDA

View Full Version : Load mask centered



jmoraes
11 Sep 2009, 7:50 AM
I'm extending a Panel and i would like to show a load mask before every thing that i need in it loaded, but i don't know which event is necessary to use to show the Loading message centered in the Panel.

I tried afterRender, but the loading message appears at left-middle.

Can anyone help?

Regards.

jmoraes
11 Sep 2009, 7:53 AM
I'm using ext 3.0

jmoraes
11 Sep 2009, 9:01 AM
Event to be used is: onLayout.

Sample:



CustomPanel = Ext.extend(Ext.Panel, {
constructor: function(config) {
CustomPanel.superclass.constructor.call(this, config);
},
onLayout: function() {
CustomPanel.superclass.onLayout.call(this, arguments);
var myMask = new Ext.LoadMask(this.bwrap, {msg:"Please wait..."});
myMask.show();
}
})

Ext.reg('custompanel', CustomPanel);