View Full Version : Best Way to Hide a TabBar when navigating away to a new Container/Panel set

27 Jun 2011, 11:23 PM
There has been plenty in this forum on this subject and I've tried almost all tricks.
The plan is to remove the TabBar when navigating to another screen from one of the TabPanel 'cards'

Can someone shed some light on this please .. Thx

My current code

// This works but the tab bar space is left ... which sucks.


// So I tried all the tricks ... to get the panel space to go away
// ... but nothing I've tried below will give me back the space

MyApp.views.viewPort.childrenChanged = true;
// or MyApp.views.viewPort.doComponentLayout();

28 Jun 2011, 12:47 AM
not sure with this, but have you tried setting the size of your viewPort and its body component to 100% after hiding the tabBar and executing doLayout method?

28 Jun 2011, 6:42 AM
Had no joy at all with all sorts of methods ..

I decided to scrap the TabPanel TabBar concept altogether and take over full control of the navigation and flow using normal toolbars, panels and controllers

... I figured a full day trying to nail this was getting too expensive.

28 Jun 2011, 9:32 PM
Don't know if this is the "right" way, but it works for me...

var mainPanel = Ext.getCmp('mainTabPanelView');
var details = new yourapp.views.detailsPanel({
// all your panel content or whathaveyou
listeners: {
deactivate: function (panel) {
mainPanel.remove(panel); // this removes the new tabbar item that gets started when the switch happens.. and destroys the details panel I think
mainPanel.setActiveItem(details, 'slide');