-
25 Aug 2011 2:00 AM #1
Unanswered: Changing default msg on LoadMask
Unanswered: Changing default msg on LoadMask
I am trying to change the default msg of the loadMask. I tried
Ext.apply(Ext.LoadMask.prototype,{msg:"Wait a minute..."});
but it is not working...
-
25 Aug 2011 2:58 AM #2
It belongs to where you want to use it:
when you use it for a grid you can set
in the grid config.Code:loadMask: 'text to display'
if you want to directly create it, then you can use
Ext.LoadMask is the only class i know where you have to use new Ext.LoadMask instead of Ext.create('Ext.LoadMask); as you see here: http://docs.sencha.com/ext-js/4-0/#!/api/Ext.LoadMask-method-constructorCode:new Ext.LoadMask({Ext.Element}, {msg: 'text to display'});
hope i could help
-
27 Aug 2011 7:49 AM #3
@vasion, I just tried your code and it worked fine. Using Ext.apply() seems like a bit of a strange way to set a single property value though, why not just:
I agree with raz0r1 that this probably isn't a good idea though I can sympathize with why you might want to do it. A line almost identical to this appears in each of the locale files to translate the default message into other languages.Code:Ext.LoadMask.prototype.msg = 'Wait a minute...';
@raz0r1, you can use Ext.create() with a loadmask:
Code:Ext.create('Ext.LoadMask', el, {msg: 'text to display'});


Reply With Quote