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!
You can simply call the setTitle
method available with the Panel
class.
panel.setTitle('Bye World');
Sencha Docs is your friend. Read it!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With