Home  >  Article  >  Web Front-end  >  Extjs 3.3 switch tab to hide the corresponding toolbar and appear blank solution_extjs

Extjs 3.3 switch tab to hide the corresponding toolbar and appear blank solution_extjs

WBOY
WBOYOriginal
2016-05-16 17:38:311358browse

On a whim today, I wanted to hide the corresponding toolbar when switching the tabpanel, but the result was blank, so let’s bear with the blank first!

No nonsense, here’s the code, the code is as follows:

Copy the code The code is as follows:

//Hide
Ext.getCmp('Tab2').tbar.hide();
Ext.getCmp('Tab2').tbar.dom.style.height = '0px';
// Show
Ext.getCmp('Tab2').tbar.show();
Ext.getCmp('Tab2').tbar.dom.style.height = '27px';//The height can be defined by yourself

Done, so easy!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn