Ext.panel header change

I want to dynamically set the title bar. And the following does not 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! 
+6
source share
1 answer

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

 panel.setTitle('Bye World'); 

Sencha Docs is your friend. Read it!

+8
source

Source: https://habr.com/ru/post/904005/


All Articles