View Full Version : How to get statusbar elements?

24 Jul 2009, 5:38 PM
Hi, how can I get the elements of the status bar, I'm looking for a way to change the text of the element in real time, see attachement...

Is there something like this??

statusBar = Ext.getCmp('mysb');
statusBar.get(2).Text="New Text";


24 Jul 2009, 6:18 PM
Just keep a reference to the items you add:

var plainText = new Ext.Toolbar.TextItem('Plain Text');

bbar: new Ext.ux.StatusBar({
defaultText: 'Default status',
id: 'basic-statusbar',
items: [{
text: 'A Button'
}, '-', plainText, ' ', ' ']

plainText.setText('The New Text');