PDA

View Full Version : Tab change question



LesJ
15 Apr 2014, 11:11 AM
Why do I need the suspendLayouts and resumeLayouts calls in this example?

Ext.define('KitchenSink.view.tab.TabController', {
extend: 'Ext.app.ViewController',
alias: 'controller.tab-view',


onTabChange: function(tabs, newTab, oldTab) {
Ext.suspendLayouts();
newTab.setTitle('Active Tab');
oldTab.setTitle('Inactive Tab');
Ext.resumeLayouts(true);
}
});

evant
15 Apr 2014, 12:53 PM
Because it will trigger a layout of the tab bar twice without it.