2

how can i hide in runtime the title of panel??

this is my code:

{
  xtype: 'panel',
  id: 'pnlAllCenter',
  border: false,
  layout: {
    align: 'stretch',
    type: 'vbox'
  },
  title: '<center>Main Application</center>'
}

now in runtime i need to hide this title! (i need something like this Ext.getCmp('pnlAllCenter').title.remove();)

thanks!!

jack.cap.rooney
  • 1,306
  • 3
  • 21
  • 37
  • Possible duplicate of [ExtJS Panel Title](http://stackoverflow.com/questions/3004444/extjs-panel-title) – Vadzim Feb 10 '17 at 19:16

1 Answers1

7

You're quite close...

Ext.getCmp('pnlAllCenter').getHeader().hide();

EDIT

To completely remove the header use

Ext.getCmp('pnlAllCenter').getHeader().destroy();
Stefan Gehrig
  • 82,642
  • 24
  • 155
  • 189