Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing an Ext.panel title

Tags:

extjs4

I'd like to dynamically set the panel title. And the following doesn't seem to work! Any ideas? Thanks in advance!

Ext.create('Ext.panel.Panel', {
       id: 'p0',
       title: 'Hello World',
       width: 200,
       html: '<p>Lorem ispsum doler sit</p>',
       renderTo: Ext.getBody()
});

Ext.getCmp('p0').title = 'Bye World'; //does not work!    
Ext.getCmp('p0').header.title = 'Bye World'; //does not work either!
like image 990
Sunder Avatar asked Dec 18 '11 03:12

Sunder


1 Answers

You can simply call the setTitle method available with the Panel class.

panel.setTitle('Bye World');

Sencha Docs is your friend. Read it!!

like image 66
Abdel Raoof Olakara Avatar answered Jan 03 '23 00:01

Abdel Raoof Olakara