View Full Version : How to change LoadMask message

31 May 2012, 1:26 PM
[ExtJS 4.1.0 rc3]

I can't figure out how to change the message in a LoadMask. There is no "setMsg()" method and update() doesn't work.

I'm trying to mask the center panel of a border layout while I am loading some data. The simplest solution I found while searching forums, etc. was to use setLoading() like so in my loop:

Ext.getCmp('my-center-panel').setLoading("Loading: "+cnt);

The value of cnt changes with each iteration, but the message never changes. I tried the workaround someone suggested in a comment in the setLoading() doc (which seems to have disappeared now), by calling setLoading(false) before calling setLoading() again. That also doesn't work.

Seems like a bug to me, but maybe I'm doing something wrong.

31 May 2012, 1:59 PM
This seems to work ...

var panel = Ext.create('Ext.panel.Panel', {
title: 'Hello',
width: 200,
height: 200,
html: '<p>World!</p>',
renderTo: Ext.getBody()

panel.setLoading('loading panel ...');

panel.setLoading('still loading panel, geez ...');
}, 2000);


31 May 2012, 2:56 PM
It was my mistake. Thanks for the simple example to help point it out to me.